The end date must be later than the start date -- another convenience of my97datepicker calendar Control

Source: Internet
Author: User

When performing a Time query, you sometimes need two dates, from one date to another, but there is a problem. For example, what if the end date of the latter is later than the start date? It is troublesome to use js to write and verify data. You can use this calendar control to conveniently display the end date only after the start date. For details, refer to the following:

For example, if I select the start date as July 22, July 28, the end date can only be selected from the date after July 15, July 28, saving us the trouble of verifying that the end date is earlier than the start date.

The Code is as follows:

Input id = "startdate" of the start date"

Input id = "enddate" of the end date"

Date range: <input id = "startdate" class = "wdate" type = "text" onfocus = "Var enddate = $ DP. $ ('enddate'); wdatepicker ({onpicked: function () {enddate. focus () ;}, maxdate: '# f {$ DP. $ D (\ 'enddate \')}'}) "/> to <input id =" enddate "class =" wdate "type =" text "onfocus =" wdatepicker ({mindate: '# f {$ DP. $ D (\ 'startdate \ ')}'}) "/>

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.