jonthornton / Datepair.js

A javascript plugin for intelligently selecting date and time ranges, inspired by Google Calendar.
https://www.jonthornton.com/Datepair.js
358 stars 87 forks source link

about defaultDateDelta? #89

Closed jinhang closed 7 years ago

jinhang commented 7 years ago
defaultDateDelta
Fill in the second date value with the specified range when the users selects the first date. Value is in days. Set this to null to disable automatically setting the second date.
var basicExampleEl = document.getElementById('basic-date');
var datepair = new Datepair(basicExampleEl);
datepair.defaultDateDelta = null;
datepair.defaultTimeDelta = null;

it is no effect about it.

jinhang commented 7 years ago
var datepair = new Datepair(basicExampleEl, {
            'defaultDateDelta': null,      
            'defaultTimeDelta': null   
        });

it is no effect

jonthornton commented 7 years ago

Sorry, I'm not able to reproduce this. Can you post a jsFiddle that demonstrates the problem?