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.
Hi, I did not find any code UWP, if you have any can you please post me, with nullable DatePicker
This feature will be welcome