Closed NicolasJEngler closed 7 years ago
Custom shortcuts aren't selecting a date range when clicked on. Currently, this is the object with the options that I'm passing to the plugin:
$('#custom-date-1').dateRangePicker({ format: 'D MMM', separator: ' - ', autoClose: true, singleMonth: true, showTopbar: false, hoveringTooltip: false, showShortcuts: true, customShortcuts: [ { name: 'This week', dates : function() { var start = moment().day(0).toDate(); var end = moment().day(6).toDate(); return [start,end]; } }, ... ] });
Am I missing something? I'd appreciate any hint of what is going on.
Closing this issue as the main problem was related to the removal of non-breaking spaces, an operation I was doing on the side, generated with the shortcuts.
Custom shortcuts aren't selecting a date range when clicked on. Currently, this is the object with the options that I'm passing to the plugin:
Am I missing something? I'd appreciate any hint of what is going on.