Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

Datepicker: Possible to bind to Nullable date value?

$
0
0

Hi everybody!

I have a nullable date field in my object and I want to bind a date picker to it. When the value is null, I would just want to show no value in the picker. Is this possible?

I tried

datepicker.SetBinding (DatePicker.DateProperty, vm => vm.DueDate, BindingMode.TwoWay);

but this results in a NullValueException when the view is shown.

Any ideas?


Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>