EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: arma on February 06, 2014, 08:47:22 PM



Title: Clear Datebox
Post by: arma on February 06, 2014, 08:47:22 PM
Hi,

Just a trivial question, i would like to clear a datebox by doubleclick event, but i don't see any doubleclick event in the doc so i can set empty value. Any idea how without adding an additional clear button next to datebox component.

Regards,


Title: Re: Clear Datebox
Post by: stworthy on February 07, 2014, 12:30:57 AM
Please try to add a 'Clear' button to the datebox button bar.
Code:
<script>
var buttons = $.extend([], $.fn.datebox.defaults.buttons);
buttons.splice(1, 0, {
text: 'Clear',
handler: function(target){
$(target).datebox('clear');
}
});
</script>