jrunge/jquery-mobile-datebox — comment on commit d9eef26369353d6d46bef9bef1cdb7d53008ecfb
File:  line 0
By jrunge:

Makes sense. Honestly, I don't think you had hardreset() when I first implemented the feature. I just assumed _update() would cover what I needed.

My only concern is that _update() is already pretty computationally expensive, and hardreset() more so. Unfortunately, I can't think of an easy way to only perform the necessary updates, without a lot of ugly conditional logic.

Glad you liked the idea, I'll update my repo to reflect the change. I have one more suggestion, for the closeCallback(), it would be useful to pass the state of the datebox to the function, as shown below. This is similar to how jquery ui implements the onClose() method in their datepicker, the only difference being that they pass the date as text rather than an object (easy to do either)

if ( self.options.closeCallback !== false ) { callback = new Function(self.options.closeCallback(self.theDate, self)); callback(); }

Let me know what you think and if you want me to create another pull request with one or both changes. I'm not really sure what's better for you, as I'm still a little new at using github.