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

minDate not working #59

Closed sergomet closed 8 years ago

sergomet commented 8 years ago

I try to set minDate to today.

    // initialize input widgets first
    $('#datePair .time').timepicker({
        'showDuration': true,
        'timeFormat': 'H:i'
    });

    $('#datePair .date').datepicker({
        format: 'm/d/yyyy',
        minDate: moment(),
        autoclose: true
    });

    // initialize datepair
    $('#datePair').datepair();

Also tried with: mindate: new Date(), it doesn't work.

jonthornton commented 8 years ago

The datepicker isn't part of this project. Consult the documentation for the datepicker plugin you're using. It's unclear which one from the example you posted.