question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Setting mindate/maxdate via options only sets date

See original GitHub issue

This works


$('#example14').datetimepicker({
    minDate: new Date(2010, 11, 20, 8, 30),
    maxDate: new Date(2010, 11, 31, 17, 30)
});

This does not work (but it will set the min/max for DATE appropriately)

$('#example14').datetimepicker().datetimepicker('option', {
    minDate: new Date(2010, 11, 20, 8, 30),
    maxDate: new Date(2010, 11, 31, 17, 30)
});

Expected outcome: Both the min/max date and TIME should be set

Issue Analytics

  • State:closed
  • Created 11 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
trentrichardsoncommented, Sep 13, 2012

Yes, a change was made in 1.0.2 to better apply options after initialization. I am closing this one.

0reactions
quetzygcommented, May 23, 2013

@pontikis, nice one!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Changing minDate and maxDate on the fly using jQuery ...
I've written a simple little function that gets called whenever the user selects a new event, but it only ever shows the initially...
Read more >
How to Set minimum and maximum date in jQuery UI Datepicker
With minDate and maxDate options, you can restrict date range of jQuery UI Datepicker widget. The user will only able to select the...
Read more >
Options - getdatepicker.com
Takes an [ string or Date or moment ] of values and allows the user to select only from those days. Setting this...
Read more >
jQuery DatePicker - Set the date range (minDate, maxDate or ...
Hello, I have a jQuery date picker which is initalised such that the user can select any date. I also have a product...
Read more >
Minimum and Maximum Constraints for Date and Time Pickers
When the minDate property is set, previous days cannot be selected and browsing to previous months is inhibited. The same happens in the ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found