vikramkakkar / SublimePicker

A material-styled android view that provisions picking of a date, time & recurrence option, all from a single user-interface.
Apache License 2.0
2.31k stars 407 forks source link

How to disable past dates/times or also for future? #7

Closed Rainer-Lang closed 9 years ago

vikramkakkar commented 9 years ago

@Rainer-Lang new Date().getTime() should work fine for minDate. Passing Long.MIN_VALUE for maxDate will tell SublimePicker to keep future dates open for selection.

Note: The comment above setDateRange(long, long) is wrong. Passing -1L will not work as intended. The relevant check is performed here: https://github.com/vikramkakkar/SublimePicker/blob/master/sublimepickerlibrary/src/main/java/com/appeaser/sublimepickerlibrary/SublimePicker.java#L515

Pass Long.MIN_VALUE for whichever bound you wish to keep open: minDate/maxDate.

Rainer-Lang commented 9 years ago

@vikramkakkar Working. Thanks.