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

Possibilty to return null as "no date selected"? #5

Closed Rainer-Lang closed 9 years ago

Rainer-Lang commented 9 years ago

I need the possibilty to return that the user doesn't want to set a date. I/the user start with "no date" and I need that the user also could go back to the initial value "no date".

vikramkakkar commented 9 years ago

Can you please clarify your request a bit more?

So, you want the DatePicker to be active/available for date-selection, but have no initial date set?

Btw, the option to disable the DatePicker is already available. But, I'm not sure if that's what you're looking for.

Rainer-Lang commented 9 years ago

I have a fragment where the user can define a start-date for a task. Initially the start-date is empty (null) so I write in the EditText "immediately", which means the task will start immediatly after the user pressed "start task". BUT the user could save the task as draft - and start the task later.

Now the user can open DatePicker and pick another date - which I write in the edit. If the user want to reset the start-date - he couldn't.

I need a start-date null. Maybe you have another great idea... ;-)

Rainer-Lang commented 9 years ago

Maybe a button with "none" in date- and timepicker?

Rainer-Lang commented 9 years ago

I solved this. I use a separated button to clear the EditText (date or time). => closing this issue.