Add a clear button to the datebox control of easyui.

Source: Internet
Author: User
Zookeeper

The datebox control in easyui does not have a clear button, for example:

This is incredible. It is inconvenient to clear the date when the date format is required.
Although you can manually modify easyui and related library files to add the Clear button function, you need to modify the native library file of easyui and modify multiple places, it will inevitably cause other incompatibility problems.
But with the release of version 1.3.5, this problem can be well solved, and you do not need to modify any library files, you just need to add a piece of code in the date control on the page. This is because the easyui version 1.3.5 adds a property: buttons, which can add a button between "today" and "close.
You can add the Clear button to the date control as follows:


The effect is as follows:

Of course, with this bottons attribute, you can add any buttons to the date control. However, apart from this clear button, I cannot figure out how to add other buttons to the date control. I cannot understand why easyui developers do not provide a datebox control with the clear button by default.
 

Add a clear button to the datebox control of easyui.

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.