How to set the minimum date in WdatePicker?

You can use the minDate property to set the minimum date of WDatePicker.

For example, to set the minimum date to the current date, you can use the following code:

<input type="text" id="myDatePicker" onClick="WdatePicker({minDate:'%y-%M-%d'})">

In the code above, %y-%M-%d represents the current year, month, and day. If you want to set an earlier date, you can adjust the date format as needed.

To set the minimum date to a fixed date, you can use the following code:

<input type="text" id="myDatePicker" onClick="WdatePicker({minDate:'2021-01-01'})">

In the code above, set the minimum date to January 1, 2021.

Please note that WdatePicker can only be triggered through the onClick event of an HTML element, so you need to call the WdatePicker function in the onClick attribute of the input element.

I hope the above information is helpful to you!

Leave a Reply 0

Your email address will not be published. Required fields are marked *


广告
Closing in 10 seconds
bannerAds