简体   繁体   中英

Set wickedpicker default time to empty

I'm using the wickedpicker jQuery plugin on my site, and it keeps adding the current time to my input. How do i set to to blank by default? Below is my options

 var options = { 
        title: '', //The Wickedpicker's title,
        showSeconds: false, //Whether or not to show seconds,
        clearable: false //Make the picker's input clearable (has clickable "x")
}; 

 $('#timepicker, #timepicker_hourly').wickedpicker(options);

There is no default property/method to have empty value by default. wickedpicker Adds class hasWickedpicker to attached input. You can clear the value of such inputs using .val() :

$('#timepicker, #timepicker_hourly').wickedpicker(options);
$('.hasWickedpicker').val('')

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM