To add a purge button to the Easyui Datebox control

Source: Internet
Author: User



Easyui Intermediate Datebox control is not even cleared button. For example, the following drawings:

It's unbelievable, it's inconvenient to have a date format that must be selected.
Although it is possible to manually change the Easyui and related library files to add the empty button function, but this requires changes to the Easyui native library files, and to change multiple places, will inevitably cause other incompatibility issues.
But with the release of the 1.3.5 version, this problem can be very good to overcome, and no need to change any library files, just need to add a piece of code in the date control on the page.

This is because the 1.3.5 version number of Easyui adds an attribute: Buttons. This property can now add a button between today and off.
Add a method for emptying the button in the date control, such as the following:


Effects such as the following:

Watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvehvoyg==/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70 /gravity/center ">

Of course, with this bottons property, you can add any button to the date control. But except for this empty button, it doesn't make sense to add another button to the date control. It's not clear why Easyui developers do not provide a Datebox control with a clear button by default.

Copyright notice: This article blog original article. Blogs, without consent, may not be reproduced.

To add a purge button to the Easyui Datebox control

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.