Reputation: 9
I have a problem with date and time pickers. When I use this components, the native picker is shown but if i click on cancel button, the picker value is updated to current day for date picker or to midnight for time picker. Is there a way to avoid this behaviour? I'd like that no default value was set. This behaviour occurs both on Android and IOS platforms.
This is my sample code for testing:
Form hi = new Form("Date/Time", BoxLayout.y());
Picker dp = new Picker();
dp.setType(Display.PICKER_TYPE_DATE);
Picker tp = new Picker();
tp.setType(Display.PICKER_TYPE_TIME);
hi.addAll(dp, tp);
hi.show();
Thanks,
Anna
Upvotes: 0
Views: 53