Two months ahead of normal time after enddate set in Bootstrap-datetimepicker view

Source: Internet
Author: User

The EndDate setting end time in the Bootstrap-datetimepicker view is 2016-08, (that is, dates after August are not selectable) and 2016-06 on the calendar, two months apart, that is, the date after June is not selectable

WORKAROUND: Set end date to add two months by default

But when the need to enddate for 11 or December, need to EndDate set to 2016-13/2016-14, this non-date format, plug-in is not recognized, the final solution is to modify the plugin

About 800 lines in datetimepicker.js.

if (year = = Endyear) {

Months.slice (Endmonth). addclass (' disabled ');



Months will get two left and right arrows and 12 dates for the selected date, so it takes +2

Change this code to

if (year = = Endyear) {

Months.slice (endmonth+2). addclass (' disabled ');


Two months ahead of normal time after enddate set in Bootstrap-datetimepicker view

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.