Whether it is possible to change JavaFX datePicker to skip days? - java

My question is this: Is there a solution to bekome a DatePicker with only the month and year without days? Since a standard DatePuicker works with Java LocalDate it does not seems so simple...
One of the options is to make the text field with a mask through regex, but then the "Picker" would be lost, that I would like to leave. Has somebody already faced with this?
Thanks in advance!

Related

How do you set the DateField in Vaadin 8 to highlight the default date according to the user's timezone

I would like the DateField to be defaulted to my user's timezone. I've tried DateField.setZoneId() but this really didn't seem to do anything. I then tried to do DateField.setDefaultValue(LocalDateAdjustedForTimeZone) which mostly worked in that the blue box was correctly highlighted but the black outline remained under the server's timezone.
As far as I can see in the Vaadin client component VAbstractCalendarPanel#buildCalendarBody(), there's no way to influence which day is marked with the today CSS style v-datefield-calendarpanel-day-today. The client component Java code about determining "today" looks like:
final Date tmp = new Date();
final Date today = new Date(tmp.getYear(), tmp.getMonth(), tmp.getDate());
So I guess when it's translated to JavaScript it will take the current date on the browser's system.
However, as a workaround you can at least adapt the CSS styles to hide the today marker. I wonder why Vaadin did not think about your use case (which is mine, too). Can you open an issue at Vaadin please?

Selecting a date using custom calenderview

screenshot1
screenshot2
I want a custom calenderview like these images and when we tap on any date it should show the selected date. I have done a lot research on this but I could not find any way to make a calenderview like this. please help me out, Thanks in adavnce.
Take a look at this library - https://github.com/prolificinteractive/material-calendarview
It's got exactly what you need.
Use DateTimePicker library, more details here :
DateTimePicker

JFXtra agenda to only show between certain times?

For example if I only want it to show ranges from 9am to 9pm? displayedCalendar property doesn't seem to change anything, only changed the displayed date.
Is this possible?
Right now there is only a week and day skin, showing both 24 hours. So the answer is: not at the moment.

gxt extjs datapicker without day selector

Does anyone know the way how can I create a date picker in which users only can select year and month but not days?
I wanted to use something similar like the usual datePicker but without the capability to select days.
Thanks

Java SWT DateTime - Get Selection?

I've got a DateTime (SWT.TIME) and want to know if the hours or minutes or seconds are selected.
I would like to get this information because I want that the User can scroll the mouse wheel in order to change the selected values accordingly.
Unfortunately I couldn't find any way to get the selected element of the DateTime Control. Does anybody have an idea?
DateTime provides many methods for getting the selected date. Like getHours, getMinutes, getDay, and so on. It's unclear to me what's your exact question, but appropiate setters are there as well.

Categories