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

"onChange" events? #163

Open jeron-diovis opened 8 years ago

jeron-diovis commented 8 years ago

All existing events are triggered when value "may have been updated". How do I know that value is actually changed? For now I'm tracking previous value myself and compare values on "data" event, this is extremely inconvenient.

betososa commented 8 years ago

I had the same problem, but i used this:

  rome(document.querySelector('#date').on('data', function (value) {
    console.log(value);
  });
kateier commented 7 years ago

I find ,the correct statement is blow: rome(document.querySelector('#date')).on('data', function (value) {console.log(value);}); simple var test=rome(dom_id); test.on('data',function (d) { alert(d); }) `