- F.A.Q.
- What frameworks does DateBox support?
- What are DateBox's prerequisite requirements?
- How do I install DateBox?
- How do I upgrade from jQM-DateBox?
- How do I use DateBox on an input?
- How do I set the format of the output?
- How do I limit the date or time input?
- How do I set the date or time for DateBox?
- How do I get the date or time from DateBox?
Frequently Asked Questions
What frameworks does DateBox support?
What are DateBox's prerequisite requirements?
DateBox requires jQuery - both the 2.x and 3.x branches are currently supported.
For jQueryMobile framework operation, jQueryMobile must be loaded first - generally, the last major release is supported (currently 1.4.x).
For Bootstrap operation and jQueryUI operation, the jQueryUI widget library must be loaded - a custom build can be generated on the jQueryUI Download Builder. Additionally, you will need to include the Bootstrap CSS file, or a jQueryUI CSS theme file.
For jQueryMobile framework operation, jQueryMobile must be loaded first - generally, the last major release is supported (currently 1.4.x).
For Bootstrap operation and jQueryUI operation, the jQueryUI widget library must be loaded - a custom build can be generated on the jQueryUI Download Builder. Additionally, you will need to include the Bootstrap CSS file, or a jQueryUI CSS theme file.
How do I install DateBox?
To install DateBox, you'll need to include both the JavaScript file, and the CSS file. Both can be found in the CDN repository. Numbered versions are considered "stable", while "latest" is the most recent development build. You should choose the files that contain the CSS framework you are using.
For more information, please see: Installing DateBox.
For more information, please see: Installing DateBox.
How do I upgrade from jQM-DateBox?
To upgrade from a previous version of jQM-DateBox, simply replace the CSS and JavaScript files. Note that previous versions of jQM-DateBox typically had multiple JavaScript includes, DateBox cuts that to a single file. If you have written any of your own code referencing jQM-DateBox, note that the namespace of the plugin has changed to "jtsage".
How do I use DateBox on an input?
For the most basic operation of DateBox on an input, you will need to add 2 attributes, "data-role" and "data-datebox-mode".
For more information, please see Your First DateBox.
For more information, please see Your First DateBox.
How do I change the format of the date or time output?
Often, you need a specific format of date sent to the back-end server - there are a number of ways to accomplish this.
- Alter or create a language file. For more information on how to do this, please see: Localizing DateBox.
- Override the date format for ALL languages, using the option "overrideDateFormat", a special use of "dateFormat".
- Use a second, hidden input with the "linkedField" and "linkedFieldFormat".
How do I limit the date or time input?
DateBox offers many, many options to refine the input of the date and time from the user. Please see Limiting DateBox for a full discussion of the available options. Additionally, you can page through the Limiting Options Category of the API.
How do I set the date or time for DateBox?
To preset the date in DateBox, please see the documentation section on Setting Defaults.
To programmatically set the date at later time, please see the API under "setTheDate".
To programmatically set the date at later time, please see the API under "setTheDate".
How do I get the date or time from DateBox?
To programmatically get the date at later time, please see the API under "getTheDate".
Often, using triggers or callbacks is related to this question, please see the documentation section on Callbacks and Listeners.
Often, using triggers or callbacks is related to this question, please see the documentation section on Callbacks and Listeners.