Please accept YouTube cookies to play this video. By accepting you will be accessing content from YouTube, a service provided by an external third party.

YouTube privacy policy

If you accept this notice, your choice will be saved and the page will refresh.


Show the video description

In this video we will use the TimeSquare library to create a CalendarPickerView, which is a nice alternative to the standart DatePickerDialog. We can set a minDate and a maxDate for the range and get our selected date back by setting an OnDateSelectedListener on it. We will format this date by using the DateFormat class and also get the single year, month and day with the help of the Calendar class. You can also select and return more than 1 date by setting the mode to SelectionMode.RANGE and then get a List of dates back by calling getSelectedDates.


Library with installation instructions: