I connected to the calendar, in the file myscript.js prescribed
$(document).ready(function(){ $( "#date" ).datepicker({ showOtherMonths: true, selectOtherMonths: true }); }); Clicking in the field opens a calendar. When choosing a date, the field is selected, while the calendar itself remains as if the number was not selected, and only then the field is filled with the date. Please tell me the reason?
Update from comments
The connection procedure is as follows:
<script type="text/javascript" src="js/jquery.js"></script> <script type="text/javascript" src="js/jquery-ui-1.10.4.custom.min.js"></script> <script type="text/javascript" src="js/allscripts.js"></script> <script type="text/javascript" src="js/myscript.js"></script> Where can there be a wrong connection?
If you write something at the top of the answer :
$("#date").datepicker({ showOtherMonths: true, selectOtherMonths: true, /* Кликнули на дату в календаре */ onChange: function(formated, dates){ /* Передаем выбранную дату в наш input */ $("#date").val(formated); /* Прячем календарь */ $("#date").DatePickerHide(); } });
then nothing is displayed in the box.