Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/n2ref/control_datepicker


https://github.com/n2ref/control_datepicker

Last synced: 7 days ago
JSON representation

Awesome Lists containing this project

README

        

# Control datepicker

```html






-




Очистить


...




$(document).ready(function(){
$('.ctrl-dpr').each(function() {
control_datepicker_range.create(this);
});

control_datepicker_range.setCallbackChange(function(date_from, date_to, wrapper) {
// Функция выполняющаяся после изменения даты
});

// Функция выполняющаяся для раскраски календаря
control_datepicker_range.setCallbackDayClass(function(date) {
var year = date.getFullYear();
var month = ('0' + (date.getMonth() + 1)).slice(-2);
var day = ('0' + (date.getDate())).slice(-2);
var myDate = year + '-' + month + '-' + day;
if (orders_edit.calendar[myDate] && orders_edit.calendar[myDate].type == 'weekend') {
return 'dp-weekend';
}
});
});

```