I suggest you ...

Xamarin.Forms DatePicker with Clear Button to Allow Null Dates

In Xamarin.Forms, when you have Two-Way Binding on a DatePicker control, if the date value comes in as null, the control will set its date to TODAY. What if I don't want to keep the date as null until a date is picked? There is a workaround to this. Please see this post: https://forums.xamarin.com/discussion/20028/datepicker-possible-to-bind-to-nullable-date-value (My post is at the very end of the thread). Also, the post above mine includes a github link that has the work around code.

BUT..what if I want to clear the date value? There is no way of doing this from the DatePicker. What if there was a Clear button, which upon tapping, would clear the date in the picker.

An alternative to this is creating a button next to each DatePicker and upon tapping it, it would clear that particular date, but that would require a lot of code as well as another column in the grid.

Thank you for reading.

Let me know if I can clarify my request further.

97 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Anatoliy Mykhaylovskyy shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    3 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...

      Feedback and Knowledge Base