I added a data picker inside a textbox (that should hold the selected date), it should activate when i press the textbox. the HTML code:
<input type="text" class="textboxes" data-bind="value:request().ExpiredDateTO" id="tbToDate" />
when i press the textbox the date picker doesnt work BUT when i run:
$("#tbToDate").datepicker();
in the Console of Chrome, it works fine. i placed the jQuery script inside the
self.activate
but yet.... it works only when i run the script in the console.
if anybody need it in the future... i found the answer... i used Deferred : Defferd - mozilla article (very good)
and jQuery api
i have an activate function and i added the Deffered at the begining:
and i put in the end of the activate the:
statement. it makes the job done.