florent37 / SingleDateAndTimePicker

You can now select a date and a time with only one widget !
Apache License 2.0
1.02k stars 333 forks source link

SingleDateAndTimePickerDialog more than 1 year #303

Open boby1975 opened 3 years ago

boby1975 commented 3 years ago

Hi How to set setMaxDate in SingleDateAndTimePickerDialog.Builder ? Thanks

Akhunzaada commented 3 years ago

@boby1975 The library currently supports date ranges of ±1 year only in both directions from the current date. To support more than 1 year, use separate picker for year available both from Builder class and XML.

From the examples:

new SingleDateAndTimePickerDialog.Builder(this)
                .setTimeZone(TimeZone.getDefault())
                .bottomSheet()
                .curved()
                .displayHours(false)
                .displayMinutes(false)
                .displayDays(false)
                .displayMonth(true)
                .displayDaysOfMonth(true)
                .displayYears(true)
                .defaultDate(defaultDate)
                .display();