Is your feature request related to a problem? Please describe.
Today, when Pickers of type PICKER_TYPE_DATE_AND_TIME and PICKER_TYPE_DATE are not initialized with a date value, the picker will always chose 'now' as the initial value (new Date()). This is good default value, but there are situations where other values are closer to what the user will want.
For example, if a task has set a due date, then a default reminder date could be 1 hour before that. And a default due date would probably rarely be now but maybe 3 or 7 days ahead in time.
To cover this, I suggest to add a method to define such a default value explicitly. Since it will often be dynamic (in the example above it will change each time the due date is changed), it would be most flexible to define a dateGetter function as in setDefaultDate(DateGetter) (DateGetter is interface Date get() or similar).
And probably also have the signature setDefaultDate(Date) to cover the simple case with a fixed default date (I guess setDefaultDate(date) could simply call setDefaultDate(()->date)).
I hope this makes sense.
Is your feature request related to a problem? Please describe.
Today, when Pickers of type PICKER_TYPE_DATE_AND_TIME and PICKER_TYPE_DATE are not initialized with a date value, the picker will always chose 'now' as the initial value (
new Date()). This is good default value, but there are situations where other values are closer to what the user will want.For example, if a task has set a due date, then a default reminder date could be 1 hour before that. And a default due date would probably rarely be now but maybe 3 or 7 days ahead in time.
To cover this, I suggest to add a method to define such a default value explicitly. Since it will often be dynamic (in the example above it will change each time the due date is changed), it would be most flexible to define a dateGetter function as in
setDefaultDate(DateGetter)(DateGetter isinterface Date get()or similar).And probably also have the signature
setDefaultDate(Date)to cover the simple case with a fixed default date (I guesssetDefaultDate(date)could simply callsetDefaultDate(()->date)).I hope this makes sense.