Problem with Date Picker Pervious & Next Month Days Selection

24 views
Skip to first unread message

shop.servic...@gmail.com

unread,
Jun 28, 2019, 3:12:22 PM6/28/19
to CodenameOne Discussions
If you are experiencing an issue please mention the full platform your issue applies to:
IDE: NetBeans/Eclipse/IDEA NetBeans 8.2
Desktop OS Windows 10 Pro
Simulator Latest
Device PC, Android& IOS

I am using this Picker:
            A3TimeSheetDate = new Picker();
            A3TimeSheetDate.setUseLightweightPopup(true);
            A3TimeSheetDate.setDate(inc.getDateObjectFromYYYYMMDD(a3Scheduler.ApptDate));
            A3TimeSheetDate.setType(Display.PICKER_TYPE_CALENDAR);
            SimpleDateFormat formatter = new SimpleDateFormat("E MM-dd-yyyy");
            A3TimeSheetDate.setFormatter(formatter);
            FontImage.setMaterialIcon(A3TimeSheetDate, FontImage.MATERIAL_DATE_RANGE, iconSize - 2);

However Days in previous and next months are visible however not selectable.

Attached is the Visible calendar.
Note 26th - 31 of May and 1st - 6th of July are not selectable.

Thoughts?

Thanks in advance
Regards
CalendarPrevNextMonthSelectionIssue.PNG

Shai Almog

unread,
Jun 28, 2019, 11:57:59 PM6/28/19
to CodenameOne Discussions
Hi,
this worked for me. Did you click "Done"?

Form hi = new Form("Test");

Picker A3TimeSheetDate = new Picker();
A3TimeSheetDate
.setUseLightweightPopup(true);

A3TimeSheetDate
.setDate(new Date());
A3TimeSheetDate
.setType(Display.PICKER_TYPE_CALENDAR);
hi
.add(A3TimeSheetDate);


shop.servic...@gmail.com

unread,
Jun 29, 2019, 11:07:03 AM6/29/19
to CodenameOne Discussions
Yes.
Now click/touch any date after the 30th.

touching any date in current month, you can see it is selectes/highlighted.
Touching any date like the 1st will not highlight and when clicking on Done does not change date.

Regards.

Shai Almog

unread,
Jun 29, 2019, 11:16:30 PM6/29/19
to CodenameOne Discussions
They are disabled because they're a part of the next month. You need to switch to the next month to select them. You can change their style by overriding the disabled style of Day.
Reply all
Reply to author
Forward
0 new messages