0

I am trying to add datetimepicker using jquery datetimepicker.When clicking, datetimepicker is visible.but i cant set mindate dynamically. my html code is

 <input id="pickup_date" type="text" readonly="" >

and jquery is

   $(document).ready(function() {
        $('#pickup_date').datetimepicker({                
            controlType: 'select',
            timeFormat: 'hh:mm tt',

        });
    $('#pickup_date').datetimepicker('option', 'minDate', new Date('01-jun-15'));

    });

How to do this.

shahanas sulthan
  • 297
  • 1
  • 6
  • 17

1 Answers1

1

First, I would try with this format for the date:

new Date('01/Jun/2015')

Second, this syntax for .datetimepicker seems to be working on my system:

$("#pickup_date").datepicker({ minDate: (new Date('01/Jun/2015')) })

I hope this helps.

aless80
  • 3,122
  • 3
  • 34
  • 53