My97datepicker start date is earlier than end date formatting time precise times, minutes, And seconds

Source: Internet
Author: User

The start date of my97datepicker is earlier than the end date. The formatting time is precise to the time, minute, and second.

I. Requirement: End Time> Start time. The time segment that does not meet the requirement cannot be selected.

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"

From: <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 \ ')}'}) "/>


From above

2. cannot be selected later than the current day

<Input id = "startdate" class = "wdate" type = "text" onfocus = "wdatepicker ({skin: 'whygreen', maxdate: '% Y-% m-% d'}) "/>



3. the time before the current day cannot be selected.

<Input id = "startdate" class = "wdate" type = "text" onfocus = "wdatepicker ({skin: 'whygreen', mindate: '% Y-% m-% d'}) "/>



4. format the selected time
4.1 accurate to hour, minute, and second

<Input id = "startdate" type = "text" onfocus = "wdatepicker ({datefmt: 'yyyy-mm-dd hh: mm: ss'})"/>





My97datepicker start date is earlier than end date formatting time precise times, minutes, And seconds

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.