How to set an option
Set an option by using Javascript
You can set an option during the initialization by customizing the related .timeDropper() function.
$('.roundtrip-input').timeDropper({
format: 'hh:mm'
});Options and default values
timedropper provides you with several options to customize your time pickers.
Basic options
Advanced options
Basic options
format
Returns a string formatted according to the given format string
FEATURES
| Type | string |
| Default | hh:mm |
PERMITTED VALUES
| Value | Description | Result |
|---|---|---|
| H | 24-hour format non-padded number | 0-24 |
| h | 12-hour format non-padded number | 1-12 |
| HH | 24-hour format padded number | 00-24 |
| hh | 12-hour format padded number | 01-12 |
| m | Non-padded numeric minutes | 1-59 |
| mm | padded numeric minutes | 01-59 |
| a | lower case meridian | am-pm |
| A | upper case meridian | AM-PM |
EXAMPLE
$('#myInput').timeDropper({
format: 'h:m A'
});meridians
Set time in 12-hour clock in which the 24 hours of the day are divided into two periods.
FEATURES
| Type | boolean |
| Default | false |
EXAMPLE
$('#myInput').timeDropper({
meridians: true
});init_animation
Animation style to use when init timedropper.
FEATURES
| Type | string |
| Default | fadeIn |
| Values | fadeIn, dropDown |
EXAMPLE
$('#myInput').timeDropper({
init_animation: 'dropDown'
});setCurrentTime
Sets automatically current time by default value.
If "false", the input value is considered as main time.
FEATURES
| Type | boolean |
| Default | true |
EXAMPLE
$('#myInput').timeDropper({
setCurrentTime: false
});Advanced options
autoswitch
Changes hour-minute or minute-hour on mouseup/touchend.
FEATURES
| Type | boolean |
| Default | false |
EXAMPLE
$('#myInput').timeDropper({
autoswitch: true
});mousewheel
Enables time change using mousewheel.
FEATURES
| Type | string |
| Default | false |
EXAMPLE
$('#myInput').timeDropper({
mousewheel: false
});minutesSteps
It specifies the granularity that the value must adhere to. The value must be one of these permitted options [5, 10, 15, 20, 25, 30] otherwise it will be considered false.
FEATURES
| Type | integer |
| Default | false |
| Permitted values | 5, 10, 15, 20, 25, 30 |
EXAMPLE
$('#myInput').timeDropper({
minutesSteps: 15
});