jtsage / jtsage-datebox

A multi-mode date and time picker for Bootstrap (3&4), jQueryMobile, Foundation, Bulma, FomanticUI, and UIKit (or others)
http://datebox.jtsage.dev/
Other
474 stars 166 forks source link

Flickering in case openCallback returns false #334

Closed slavap closed 10 years ago

slavap commented 10 years ago

In 1.4.4 if openCallback returns false, popup is shown anyway and immediately closed by w._t( {method: "close"} ); That looks pretty bad, I think previous behavior was better, i.e. no popup should be open at all.

jtsage commented 10 years ago

I don't disagree - I just haven't found a way to do it well yet - I am leveraging the afteropen method, so that it doesn't run into the race condition of running openCallback before the control is totally initialized.

Mentioned here: http://dev.jtsage.com/jQM-DateBox/doc/6-1-callback/

Perhaps a better idea might be an additional preOpenCallback option? or beforeOpenCallback option?

Thoughts?

slavap commented 10 years ago

beforeOpenCallback sounds good, it should not flicker.