CFv4 Using the datepicker

How can I format a date in the datepicker?

The MooTools DatePicker used in the most recent versions of ChronoForms has a default date setting using the 'International' format YYYY-MM-DD; if this is OK then it is simplest not to change it. If you need another format, then please continue.

Why are my datepicker fonts too big?

Sometimes the datepicker pops up correctly but looks ‘wrong’ - usually because some of the text is too big, or misplaced. This happens when the template CSS over-riides the date-picker CSS. You can solve this by adding custom CSS to your form to correct the problems.

How can I add a JQuery datepicker?

Problem: How to make calendar, that is always shown in the form without using an input field. One must be able to select date and then the value must be submitted with the form. (This was needed for table reservation form for restaurant).
This FAQ was originally posted by user Zahorijs in the forums and has been bug-fixed and updated by me. 

How can I link a datepicker to an image or link?

Some datepickers show an icon to let users know that the input is a datepicker, the ChronoForms v4 MooTools datepicker doesn't do this by default. This FAQ shows you how to add an icon, or a text link that will open the datepicker. 

How do I set the date-picker language?

Which datepicker should I use?

ChronoForms v4 has two different date-pickers included. The default is the MonkeyPhysics datepicker, the alternative is the MooTools date-picker. Unless you are still using Joomla! 1.5 you should always use the MooTools datepicker. 

How can I set start and end dates for a datepicker?

Sometimes you only want to allow the user to pick dates after a certain date - e.g. only in the future; or only after a week from today; or you only want to allow them to pick dates before a certain - e.g. only in the past; or more than ten years ago. This FAQ shows one way of doing that with the MooTools datepicker.

The new version of this tutorial for ChronoForms 8 is available here

How can I select a range of dates - part 2?

There is another FAQ here that shows you how to use the RangePicker built in to the MooTools datepicker. If you still want to use two linked datepickers to allow the user to select a start and end date then this FAQ has some code to help you.

How can I select a range of dates - part 1?

The MooTools Datepicker has a RangePicker version that isn't included in ChronoForms by default though all the necessary files are there.

How can I set a default date for a datepicker?

Normally datepicker inputs are empty when the form loads, this FAQ shows you how to set a default date.

My datepicker is hidden behind the form

Sometimes the template and form CSS work together badly and the datepicker pops up behind some other part of the form. 

How can I link two datepickers?

If you want the customer to enter a range of dates - for the start and end of a vacation for example - the simplest way is to use the DatePicker Range options. If you want to use two separate datepickers then it is possible with a little coding.

How can I allow specific dates?

Datepicker with specified dates
If you have, for example, a site where some events are only available on certain days it would be useful to be able to have only those dates available to be selected in a datepicker.