c# - Date Picker Date Returns Null If date is Greater than MM/10/YYYY -
c# - Date Picker Date Returns Null If date is Greater than MM/10/YYYY -
i using jquery datepicker , collecting values text box , passing c# controller problem when select date below 10th going controller if date more 10(05/21/2015) giving null value placed break point in browser , checked values there getting correctly
<!--/page --> <!-- javascripts --> <!-- placed @ end of document pages load faster --> <!-- jquery --> <script src="~/content/js/jquery/jquery-2.1.1.min.js"></script> <!-- jquery ui--> <script src="~/content/js/jquery-ui-1.11.4.custom/jquery-ui.min.js"></script> <!-- bootstrap --> <script src="~/content/bootstrap-dist/js/bootstrap.min.js"></script> <!-- cookie --> <script type="text/javascript" src="~/content/js/jquery-cookie/jquery.cookie.min.js"></script> <!-- custom script --> <script src="~/content/js/advertisement.js"></script> <script> // $( document ).ready() block. $(document).ready(function () { $("#strtdate,#enddate").datepicker({ format: "dd/mm/yyyy" }); }); </script> <div class="col-sm-6 col-md-6 form_field"> <label class="control-label">start date</label> <input type="text" id="strtdate" class="form-control"> </div>
thanks
the option
format: "dd/mm/yyyy"
is incorrect. utilize dateformat
dateformat: "dd/mm/yy"
the problem why 04/10/2015 works,but 04/21/2015 not because date passed controller dd/mm/yy format. , mm(month)=21
invalid.
c# jquery jquery-ui jquery-ui-datepicker
Comments
Post a Comment