-
Notifications
You must be signed in to change notification settings - Fork 0
Options
See below for explanation, options of this library.
These option is also able to combination use.
You can specify language(locale) on calendar.
This option is reflected to the following items:
- Calendar
- Header (YYYY-MM)
- Days of the week (Su, Mo, Tu, We, Th, Fr, Sa)
- dateFormat default value
en (english)
<div id="date-picker"></div>
<script type="text/javascript">
$(function(){
$('date-picker').dtpicker({
"locale": "ja"
});
});
</script>
this option specify as below two characters.
- "en" : English (default)
- "ja" : Japanese
- "ru" : Russian - Thanks to: rdolgushin. (v1.1.3-)
- "br" : Brazil - Thanks to: Mauricio. (v1.1.4-)
- "cn" : Chinese - Thanks to: jasonslyvia (v1.3.0-)
- "de" : German - Thanks to: rtakeda (v1.3.0-)
- "id" : Bahasa Indonesia - Thanks to: robzlabz (v1.4.0-)
- "tr" : Turkish - Thanks to: myfell (v1.5.0-)
- "sv" : Swedish - Thanks to: MacDknife (v1.5.0-)
- "es" : Spanish - Thanks to: maw (v1.5.0-)
improved in future updates...
You can specify default current date.
It's current date and time.
<input type="text" id="date">
<script type="text/javascript">
$(function(){
$('#date').appendDtpicker({
'current' : '2012-01-01 00:00'
});
});
</script>
[Caution] If an input-field is not empty, THIS OPTION becomes INVALID.
You can specify output format (when using appendDtpicker() method for input-field).
YYYY-MM-DD hh:mm
(This format varies, if your setting the "locale" option. For example, if "locale" option is "ja", this format will become "YYYY/MM/DD hh:mm". )
<input type="text" id="date">
<script type="text/javascript">
$(function(){
$('#date').appendDtpicker({
'dateFormat' : 'YYYY/MM/DD hh:mm'
});
});
</script>
In that case...Sample output (input-field):
2012/01/01 10:30
- YYYY: Year (Full) - ex: 2012
- YY: Year (Century) - ex: 12
- MM: Month - ex: 01
- M: Month - ex: 1
- DD: Day - ex: 02
- D: Day - ex: 2
- hh: Hour - ex: 06
- h: Hour - ex: 6
- mm: Minutes - ex: 07
- m: Minutes - ex: 7
You can change the interval of minute on timelist.
30 minute. it means interval of each 30 minute.
<input type="text" id="date">
<script type="text/javascript">
$(function(){
$('#date').appendDtpicker({
'minuteInterval' : 15
});
});
</script>
min: 5 ... max: 30.
Set the first day of the week displayed in the calendar
0
<input type="text" id="date">
<script type="text/javascript">
$(function(){
$('#date').appendDtpicker({
'firstDayOfWeek' : 1
});
});
</script>
min: 0 ... max: 6.
- 0 = Sunday
- 1 = Monday
- 2 = Tuesday
- etc.
Close (Disappear) the picker when selected date & time.
This option is available when the picker has appended to input-field.
false
true / false