Customize DatePicker to select year and month - java

The current JavaFX implementation of a DatePicker only allows you to select a year and month by clicking the < > buttons. Most modern implementations of DatePicker allow you to select the year for example like this:
How do we get this functionality?

So far I have not seen a datepicker with that feature in JavaFX. Neither the javafx.scene.control.DatePicker nor the ControlsFX- and JFXtras-controls have such a functionality as far as I know (ControlsFX even doesn't provide a datepicker to my knowledge).
However on http://calendarcontrolinjavafx.blogspot.com/2012/01/calendar-control-in-javafx-20.html there is a custom datepicker with such a functionality (but with a different style) together with a demo application.
Unfortunately the implementation is from 2012 and is in JavaFX 2. However, with minimal changes it runs with >= JavaFX 8. Below are a few snapshots. I have no idea concerning the stability but maybe it's worth a try.

I am not sure if you needed a year picker or a year-month picker but I assume the latter. I also needed one for year-months and could not find anything that works for javafx 8 or above so I wrote one: https://github.com/perNyfelt/fx-yearmonth-picker.

Related

Calendar in Android with everyday choice button

I'm a begginer in Android development (Java language) and would gladly appreciate any advice on how to create my project. In this part, I would like to add buttons assessing user's mood (good, average, bad) so that everyday he can make such a choice. The choice would be saved in the calendar and seen as a appropriate background colour of a particular date.
For example, like here:
I would like to mark that way all days, colour depending on the choice made.
I tried implementing Caldroid, but apparently I do something wrong because it can't be read - tried to fix it numerous ways. So maybe some other solution?

Is it possible to customize DatePickerDialog dialog?

I'm currently using this https://developer.android.com/reference/android/app/DatePickerDialog
What I would like to do is to be able to mark specific dates with a specific color. Say for example march 3 5 and 7 have a red circle around them. Is this possible?
There is also another easier way from customizing DatePickerDialog!
You can use this great library Material DateTime Picker to achieve your desired features.
[DatePickerDialog] setHighlightedDays(Calendar[] days):
You can pass a Calendar[] of days to highlight within setHighlightedDays(Calendar[] days) method. They will be rendered in bold. You can tweak the color of the highlighted days by overwriting mdtp_date_picker_text_highlighted
(from official doc)

SWT Nebula CDateTime DateSelection

I want to use the Nebula CDateTime component, but I have the problem, that the selected date is not marked in the panel (selected is the 17):
What do I need to change so that the selected date ishighlighted?
There's a bug report about this:
Highlighting feature for CDateTime. There's also code that you could use to get it working in your code.
Unfortunately, it doesn't seem to ever have made it into the release version for whatever reason.

Calendar in wicket

I would like to have a small brief calendar in wicket.
DatePicker is a component which has textField, and calendar is being shown for short period of time, until you select date.
But I need permanent calendar, like in Outlook.
Wicket FullCalendar is very large for me, I need the one of datePicker format.
There is such component, or no?
I don't think, there's a readymade component in core wicket for that. But it should be pretty easy to roll your own. Here are a few ideas on that:
Grab the DatePicker and extract the calender from there (Note that the DatePicker uses YUI internally).
Have a look at the WijCalendar component from the WiQuery project
just render the values as a table, apply CSS and let jQuery's Themeroller have a go.
Recently I needed such a calendar widget too. But couldn't find one. The Wicket calendar picker is based on the YUI component. Despite the base component supports inline display I couldn't find any parameter for the wicket date picker that triggers this mode.
Finally I came up with writing my own simple component. It uses the JQueryUI calendar widget.
Take also a look at Webical project. It's written in Wicket and it has what you need in its GUI: http://code.google.com/p/webical/wiki/Screenshots

Date Time Picker like in Windows

I am looking for a component for Swing that would do the same thing that Windows 7 date and time pickers do (or be even better). They look so:
And have following features I need:
you cannot enter an invalid value (value is ignored as you type and not when you leave the field)
it allows continuous updating of the field until the first change made by user (take a look on the time setting in Windows 7)
you can select and change at once only one position - not the whole text at once (so colons and points cannot be removed)
up and down buttons
calendar button (but it's rather optional for me)
I have tried JSpinner with a DateEditor but it doesn't have this features. JXDatePicker only adds the calendar button.
Generally I am looking for a nice way to let user enter date and time in a powerful and simple way. Windows 7 solution seems to be quite good.
Thank you!
best and free DatePickers around are JXDatePicker and JCalendar, in both cases are there focus about correct implementations of Date and Focus workaround, and excelent Renderer and Editor for JTree / JTreeTable / JTable
to your needs ---> all these funcionalities are implemented by default, not clear from your questions exactly whats wrong, I'm Win7 and JXDatePicker and JCalendar but I never saw these issues,
in both cases you have to implementing own workaround for SpecialDays as hollydays (and etc),

Categories

Resources