bevacqua / rome

:calendar: Customizable date (and time) picker. Opt-in UI, no jQuery!
https://bevacqua.github.io/rome
MIT License
2.91k stars 223 forks source link

hide event runs even without the datepicker being shown once #194

Open luccasr73 opened 4 years ago

luccasr73 commented 4 years ago

After the page loads, the hide event runs without at least the datepicker ever being shown

let pickersInitial= document.querySelectorAll(' .date-initial')
        pickersInitial.forEach(elm=>{
            rome.find(elm).once('ready', function (ops) {
                rome.find(elm).on('hide',  function (v){
                    console.log(elm)
                })
            })
        })