c# - Xamarin.Forms DatePicker not respecting Minimum / Maximum on WindowsPhone -


it may order of property setting or something, i've tried multiple ways, , verified properties prior function completing.

however, when try following:-

datepicker datepicker1 = new datepicker(); datepicker1.minimumdate = datetime.now.date; datepicker1.maximumdate = datetime.now.date.add(new timespan(7,0,0,0)); datepicker1.date = datetime.now.date; datepicker1.format = "mmm dd, yyyy"; 

on windowsphone when test this, can still select date earlier minimum , maximum date values set.

actually further testing adding event listener dateselected, i've noticed control doing sorts of weird things:-

so, original date when run is: aug 03, 2015

then change month july, , click tick. shows jul 03, 2015 less minimum date. don't event raised via 'dateselected' change ui date i've selected.

if change month june, no event raised, display shows jun 03,2015.

if change month october, event raised, , display shows aug 10, 2015 maximum date, fine.

if change month june again, event raised, , display shows aug 03, 2015 minimum date.

i don't appear able trap dateselected property change 1 doesn't appear firing on ui update try , handle scenario way.

is there way of getting control behave correctly? i'm using xamarin.forms 1.4.2.

please upgrade 1.4.4.

xamarin forms 1.4.3 had many updates in regards bug fixes around datepicker in android , winphone best upgrade way because 1.4.4 fixed many other issues well.

the date picker issues fixed in 1.4.3 are

https://bugzilla.xamarin.com/show_bug.cgi?id=27537

https://bugzilla.xamarin.com/show_bug.cgi?id=28424


Comments

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -