Click here to Skip to main content
15,886,030 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have a wizard contains 4 step with knockout its work fine but when i added datepicker of Jquery on step 2 date picker doesn't display (just an input type text display) if i refresh my browser it display, but i lose information of step 1 (if i refresh my browser), how can i solve my problem,

XML
<script id="step1" type="text/html">
 <div>Name: <input type="text" data-bind="value: Name"></div>
 <div>Description: <input type="text" data-bind="value: Description"></div>
</script>

<script id="step2" type="text/html">
  Start: <br/><input type="text" id="from"  data-bind="value: StartDate">
  Stop:<br/> <input type="text" id="to" class="required" data-bind="value: EndDate">
</script>



$(function () { $("#from").datepicker({ defaultDate: "+1w", changeMonth: true, numberOfMonths: 1, onSelect: function (selectedDate) { $("#to").datepicker("option", "minDate", selectedDate); } }); $("#to").datepicker({ defaultDate: "+1w", changeMonth: true, numberOfMonths: 1, onSelect: function (selectedDate) { $("#from").datepicker("option", "maxDate", selectedDate); } }); });


thanks,
Posted
Updated 1-Aug-12 13:32pm
v2
Comments
Christian Graus 1-Aug-12 18:55pm    
There is a standard date picker in jquery ?
Sergey Alexandrovich Kryukov 1-Aug-12 19:04pm    
What jQuery? Just look at this "script" -- where is it?
--SA
Christian Graus 1-Aug-12 19:08pm    
Sure - but, my core question is, what jquery date picker ? If there's one in the standard jquery release, it's news to me, and if there's not, then even if he posted code, we still could not know what he was using.
Sergey Alexandrovich Kryukov 1-Aug-12 19:23pm    
Right. jQuery or not, there are commonly used Web date-time pickers (what is "standard" though), pretty much commonplace, but who knows what OP means?
--SA
Sergey Alexandrovich Kryukov 1-Aug-12 19:03pm    
No, because instead of your script you show... who knows what. Some HTML or what? Do you really understand what you are doing? Or is it all mistyping...?
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900