Skip to content

Instantly share code, notes, and snippets.

@maryleloisa
Last active November 9, 2015 08:40
Show Gist options
  • Save maryleloisa/d2c44548aa96285fc6db to your computer and use it in GitHub Desktop.
Save maryleloisa/d2c44548aa96285fc6db to your computer and use it in GitHub Desktop.
$leavingDatePicker.add($returningDatePicker).pikaday({
firstDay: 1,
minDate : moment().toDate(),
maxDate : moment().add(6, 'months').endOf("month").toDate(),
position: 'bottom right',
i18n : {
previousMonth: 'Önceki Ay',
nextMonth : 'Sonraki Ay',
months : 'Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık'.split('_'),
weekdays : 'Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi'.split('_'),
weekdaysShort: 'Paz_Pts_Sal_Çar_Per_Cum_Cts'.split('_')
},
format : 'LL, dddd',
onOpen : function () {
var $picker = $(this.el),
$input = $(this._o.field),
$inputGroup = $input.closest('.input-group');
$picker.offset({left: $inputGroup.offset().left});
$picker.css('min-width', $inputGroup.width());
},
onSelect: function () {
console.log('Time has changed!')
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment