Datepicker.js applications

Source: Internet
Author: User

 var calendar2 = new DatePicker (); 
Calendar.init ({
' trigger ': ' #datetime-picker-start ',/* selector, triggering popup plugin */
' type ': ' Date ',/*date date selection Datetim E Call Date Time Select the time to select the YM Recall month selection */
' mindate ': calculationdate (1),/* Minimum date 1 days */
' maxdate ': calculationdate (30),/* Maximum date */
' format ': ' Yyyy-mm-dd zero ',
' onClose ': function () {/* * Cancel when event is triggered */
if (this.value&&this . value.length>9) {
var date=new date (Date.parse (This.value.substr (0,10). Replace (/-/g,  "/")));
var startdate = new Date (Date.parse ($ ("#datetime-picker-start"). Val (). substr (0,10). Replace (/-/g, "/")));
var endDate = new Date (Date.parse ($ ("#datetime-picker-end"). Val (). substr (0,10). Replace (/-/g, "/")));
if (!isnan (endDate)) {
$ ("#datetime-picker-end"). Val ();

if (!isnan (StartDate)) {

Calendar1.init ({
' mindate ': calculationdatebystartdate (1,startdate),/* Minimum date 1 days */
' maxdate ': calculationdateyearbystartdate (1,startdate),/* Maximum date 1 years */
// })

Calendar1.init ({
' Trigger ': ' #datetime-picker-end ',/* selector, trigger popup plugin */
' Type ': ' Date ',/*date call date Select DateTime to recall date time select time to select YM to recall month selection */
' MinDate ': calculationdatebystartdate (1, StartDate),/* Minimum date 1 days */
' MaxDate ': calculationdateyearbystartdate (1, StartDate),/* Maximum date 1 years */
' Format ': ' Yyyy-mm-dd 24 o'clock ',
' OnClose ': Trigger event when function () {/* is canceled */
if (this.value&&this.value.length>9) {
var date=new date (Date.parse (This.value.substr (0,10). Replace (/-/g, "/")));
Setendtime ();
}
}
});
Calculationdatebystartdate (1, StartDate);
Calculationdateyearbystartdate (1, StartDate);
}
Setendtime ();
}
}
});

Datepicker.js applications

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: info-contact@alibabacloud.com 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.