Bug #1773: fix datepicker bug with native mode