SteveSanderson/knockout — Issue #328: Running jQuery UI datepicker before applying bindings in a "with" breaks the datepicker
Author: jonhyman
Created: 2012-02-13 20:26:15+00:00
State: open

I'm not sure how widespread this issue is in general, but I'm having problems with jQuery UI's datepicker when applying bindings.

A JSFiddle repro is at http://jsfiddle.net/MRaKp/1/:

Three textboxes get datepicker applied to them:

* One inside a `data-bind="with: ..."` that gets `.datepicker()` applied before the `ko.applyBindings` call. This one breaks.
* One inside a `data-bind="with: ..."` that gets `.datepicker()` applied after the `ko.applyBindings` call. This one works.
* One outside a `data-bind="with: ..."` that gets `.datepicker()` applied before the `ko.applyBindings` call. This one works.

Using knockout-latest.