{}
{ startOfWeek: 'monday', separator : ' ~ ', format: 'DD.MM.YYYY HH:mm', autoClose: false, time: { enabled: true } }
{}
{ language:'cn' }
{ language:'en' }
{ language: 'custom' }
{ startDate: '2014-11-20' }
{ startDate: '2013-01-10', endDate: '2013-02-10' }
{ minDays: 3, maxDays: 7 }
{ startOfWeek: 'monday' }
{ getValue: function() { return this.innerHTML; }, setValue: function(s) { this.innerHTML = s; } }
{ separator : ' to ', getValue: function() { if ($('#date-range200').val() && $('#date-range201').val() ) return $('#date-range200').val() + ' to ' + $('#date-range201').val(); else return ''; }, setValue: function(s,s1,s2) { $('#date-range200').val(s1); $('#date-range201').val(s2); } }
{ format: 'dddd MMM Do, YYYY' //more formats at http://momentjs.com/docs/#/displaying/format/ }
{ shortcuts : { 'next-days': [3,5,7], 'next': ['week','month','year'] } }
{ shortcuts : { 'prev-days': [3,5,7], 'prev': ['week','month','year'], 'next-days':null, 'next':null } }
{ shortcuts : null, startOfWeek: 'sunday', language:'en', customShortcuts: [ //if return an array of two dates, it will select the date range between the two dates { name: 'this week', dates : function() { var start = moment().day(0).toDate(); var end = moment().day(6).toDate(); return [start,end]; } }, //if only return an array of one date, it will display the month which containing the date. and it will not select any date range { name: 'Oct 2014', dates : function() { //move calendars to show this date's month and next month var movetodate = moment('2014-10','YYYY-MM').toDate(); return [movetodate]; } } ] }
{ language:'en', customValueLabel: 'Dynamic Ranges', showCustomValues: true, customValues: //if return an array of two dates, it will select the date range between the two dates [ { name: 'MTD', value: 'Month To Date' }, { name: 'YTD', value: 'Year To Date' } ] }
{ showShortcuts:false }
{ autoClose: true }
{ separator : ' ~ ' }
{ inline:true, container: '#date-range12-container', alwaysOpen:true }
{ autoClose: true, singleDate : true, showShortcuts: false }
{ batchMode: 'week', showShortcuts: false }
{ batchMode: 'week-range', showShortcuts: false }
{ showShortcuts: false, beforeShowDay: function(t) { var valid = !(t.getDay() == 0 || t.getDay() == 6); //disable saturday and sunday var _class = ''; var _tooltip = valid ? '' : 'weekends are disabled'; return [valid,_class,_tooltip]; } }
$('#date-range16').dateRangePicker( { showShortcuts: false, format: 'YYYY-MM-DD' }); $('#date-range16-open').click(function(evt) { evt.stopPropagation(); $('#date-range16').data('dateRangePicker').open(); }); $('#date-range16-close').click(function(evt) { evt.stopPropagation(); $('#date-range16').data('dateRangePicker').close(); }); $('#date-range16-set').click(function(evt) { evt.stopPropagation(); $('#date-range16').data('dateRangePicker').setDateRange('2013-11-20','2014-08-25'); }); $('#date-range16-clear').click(function(evt) { evt.stopPropagation(); $('#date-range16').data('dateRangePicker').clear(); }); $('#date-range16-destroy').click(function(evt) { evt.stopPropagation(); $('#date-range16').data('dateRangePicker').destroy(); });
{ stickyMonths: true, startDate: '2013-01-10', endDate: '2013-05-10' }