JavaFX DatePicker customization - javafx

I'm using the DatePicker for the first time and I noticed something which I find highly irregular, at least from my point of view. In my case the first day of the week is Sunday. Here is how the calendar looks for May 2016 on the DatePicker.
And here is an example of what I would like , as the Windows calendar.
If the first day of the week is a 1st I'd like to display the last week of the previous month not the other way around. Is there any way to customize this? I have looked over the documentation and other issues with customization but haven't been able to find an answer.

Related

Custom day, week, month resource views in fullcalendar

I am interested to find out if it is possible to customize fullcalendar to do custom views of resource calendars for month, week and day views. The events displayed are only single all-day events. No multi-day events or time data.
The month plan is similar to the daily scheduler vertical resource view at fullcalendar.com
However, I need it for a month view with days as vertical rows.
I have not found any examples of the required day view or week view.
I have tried to adjust the settings and played around with it for a bit, but I haven't found out if this is possible.
I include some simple sketches of what I am looking for. I hope to get a few pointers if this is viable in fullcalendar or if I should look at another library.

Fullcalendar: start day at 8AM instead of midnight

We are use the Fullcalendar plugin for booking our events
Al lot of the events take place around midnight so often we see events starting at 22:00 and ending at 4:00. It is possible to insert these in Fullcalendar in the week view but it is a little tricky. It would make more sense to us to start the days at 8 in the morning and end at 8 in the morning so events will usually be visible in a single day.
I did not find this option in the documentation, so I would like to know if there is an existing implementation that does this job or else find a hint where I would start to enhance Fullcalendar to make this possible.
It is possible using the minTime and maxTime by setting them as the following.
minTime: "08:00:00",
maxTime: "32:00:00",
Here is a codepen showing this.
However it is quite buggy. If you try to put a small event into the time that would be the next day after 12PM, then the calendar does not really know what to do and the even will be be out of view. If the event is at least long enough to bring it to the next day past 8AM then it will be visible across both days. Due to the bugs with this method I would suggest using the calendar with its default minTime and maxTimes is the best approach.

Fullcalendar is showing the wrong number of weeks for September with weekMode = 'variable' or 'liquid'

I'm using fullcalendar 1.6.4 in conjunction with a Drupal 7 site; all is well except that I'm getting the wrong number of weeks for some months with weekMode set to "variable" or "liquid". For September 2013, I get four rows of weeks, which means that I lose the last two days of the month. Most other months appear correctly, although December 2012 is shown with 5 weeks (losing the 30th and 31st), and January, February, and October 2013 are all shown with 6 weeks (one more than is needed).
I've been doing some quick hacking around with the render() code where the starting and ending dates seem to be worked out, but haven't come up with anything clearly better. So: are other people seeing this / is it a known issue / have I screwed up something with my installation? Thanks!
I think there's a bug here: in fullcalendar.js's MonthView.render(), it looks like the AddDays computation of visEnd (l. 1984) is getting messed up by firstDay getting string-concatenated into the value instead of added. visStart may be getting similarly affected, since it does pretty much the same thing. In any case, I stuck the line firstDay = parseInt(firstDay, 0) after the var FirstDay... statement, and things are working properly for me. This may not be the preferred way of handling the matter, but I think something like this is going on. Opinions from other eyes?
This is not a Full Calendar bug, but instead a bug in the Drupal implementation of Full Calendar. Drupal allows users to override the "start of the week" option (values of 0 to 6). Drupal is incorrectly storing this value as a string instead of a number.
See Drupal issue I opened.

Drupal: Custom date widget?

I'm trying to create a custom date widget. Users can only chose a date from the next 10 days. So, instead of making them chose year, month, day, hours and minutes I want to have a single select list for the date (next 10 days) and two select lists for the time (hours and minutes).
Here is what I'm trying to achieve:
http://i52.tinypic.com/jikrv7.png
This is not just about changing date field settings (like granularity), I'm pretty sure I'll have to write some code to have correct dates in the select list (there could be 5 days from the current month and 5 days from the next one), and then correctly handle everything after user submits data.
What's the best way to achieve this? Where should I start from?
I would greatly appreciate any suggestions.
Thank you!
You need to implement hook_widget and possibly hook_widget_info and hook_widget_settings. Also have a look at CCK for developers.

how to include days of previous month in a calendar

I have a calendar for day view, month view and week view. In month view all the days in the particular month (month which user selects) will be displayed in a grid. Suppose if a month begins by wednesday/thursday then the cells of monday, tuesday remains blank. Instead I need to display last two days of previous month and similarly if the month ends on monday/tuesday then the remaining cells should be filled with starting dates of succeeding month. pls provide code for this functionality..... thanx in advance... :-)
Why don't you try using a premade control like the ASP .Net calendar control or jquery UI's DatePicker?
http://jqueryui.com/demos/datepicker/
I am not sure what your requirements are. Maybe there is a control out there that can work for you?
If you want to do this yourself, how are you programming it? Can you explain a little more of how you are creating this control?

Resources