JQuery doesn't locate DOM elements when using Durandal's compose
I've recently ported my company's project to Durandal using Knockout and JQuery. Straight to the problem: I need to initialize JQuery UI's datepicker using two HTML inputs. JQuery, however, is unable to locate the inputs when I do this: view: <div data-bind="if: !CurrentUser()"> <h1 data-bind="html: DisplayName"></h1> <div data-bind="compose: 'users/_UsersList.html'"></div> </div> <div data-bind="with: CurrentUser(), visible: CurrentUser()"> <h1>User detail</h1> <div data-bind="compose: 'users/_UserDetail.html'"></div> </div> viewmodel - SelectUser() function is called when a user is selected