Sometimes a full date is not needed. Let’s take the credit card expiration date as an example where you'll be needing to set the wheels to month and year. Don’t forget to set the min and max for it to make sense.
TIP: Check out this demo with a working example.
Changing the date and time format
There are two approaches depending on the outcome you are after:
For having the wheels show the same format as the returned value use the dateWheels and timeWheels settings
If you need the value to be returned in a different format than the time wheels, use the dateFormat and timeFormat settings
JS
dateWheels: 'mm - MM yy',
dateFormat: 'mm/yy'
12/24 hour time format
Configurations like 24 hour or 12 hour format with AM/PM comes from the timeFormat and timeWheels, which is a part of the localization settings, however it is ok to manually override it if you need to.
JS
timeFormat: 'HH:ii',
timeWheels: 'HHii'
TIP: Check out this demo for the different time formats.
What's next?
Browse the full API Docs: A great way to get familiar with all that the Date & Time has to offer is through the API docs.
Try and different demos: You can try, download and customize all demos.
Start a free trial: Get started with the Date & Time control by starting a free trial.