How to set minimum and maximum date and time in Codename One

Viewed 462

I have date and time pickers, both of which allow a user to select a DateTime not older than today but not longer than 6 months.

I used

picker.setStartDate(now.getTime());

and

picker.setEndDate(sixMonthsDate.getTime());

which partially works on the simulator lightweight picker by enforcing the year but not the month and day. However, doesn't work on iOS and Android.

Though I'm validating these fields, I would still love to have other dates disabled while enabling only the range specified.

Is there any way to achieve this?

0 Answers
Related