Last active
December 16, 2015 14:58
-
-
Save guilleferrer/5452023 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ranges: { | |
'Today': ['today', 'today'], | |
'Yesterday': ['yesterday', 'yesterday'], | |
'Last 7 Days': [Date.today().add({ | |
days: -6 | |
}), 'today'], | |
'Last 30 Days': [Date.today().add({ | |
days: -29 | |
}), 'today'], | |
'This Month': [Date.today().moveToFirstDayOfMonth(), Date.today().moveToLastDayOfMonth()], | |
'Last Month': [Date.today().moveToFirstDayOfMonth().add({ | |
months: -1 | |
}), Date.today().moveToFirstDayOfMonth().add({ | |
days: -1 | |
})] | |
}, | |
/* | |
Para usar los ranges por defecto, | |
sólo hay que “Activar los ranges”, pasando la opción “showRanges : true” | |
*/ | |
$('#datepicker-calendar').DatePicker({ | |
inline: true, | |
date: [from, to], | |
calendars: 3, | |
mode: 'range', | |
starts: 1, | |
showRanges: true, | |
textField : '#date-range-field', | |
onApply: function () { | |
ToggleInput(); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#datepicker-calendar').DatePicker({ | |
inline: true, | |
date: [from, to], | |
calendars: 3, | |
mode: 'range', | |
starts: 1, | |
showRanges: true, | |
textField : '#date-range-field', | |
onApply: function () { | |
ToggleInput(); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment