clockpicker icon indicating copy to clipboard operation
clockpicker copied to clipboard

the feedback events have no parameters

Open tstoev opened this issue 5 years ago • 3 comments

it would be nice to bind the events handlers to the control instance. Currently if I have more than one picker on the page, there is no way to find out which triggered the actual event(unless they are constructed separately). Adding a .bind(this) before each call will solve that.

tstoev avatar Oct 27 '19 14:10 tstoev

you can set extra function for input and send your parameter to other function , save parameter in localstorage and use this storage in clockpicker event

<input type="text" class="form-control clockpicker" value="12:25" onclick="SetId(12)">

 function SetId(val) {
        window.localStorage.setItem('temp',val);
    }

 donetext: 'Done',
        afterHide: function () {
            var t=window.localStorage.getItem('temp');
            console.log(t);
        }

ekhtiari avatar Nov 01 '19 08:11 ekhtiari

better than you can use onchange event of inputbox and call your function and send any parameter that you need

ekhtiari avatar Nov 01 '19 09:11 ekhtiari

sure, but that is a messy way to get the clock instance. Adding binding is a simple change, does not interfere with the interface that the control provides, and does not require inter-state cross-instance magic. I've actually edited the code for the system I am building, but need to go through the entire git cycle to submit it, and I simply don't have the time

tstoev avatar Nov 01 '19 09:11 tstoev