Reputation: 2694
I met some trouble while using input type dates, also I decided for reasons of compatibility to change all input type date by type of text using class datepicker.
When I'm on index.php everything works fine.
When I'm on an other page for example index.php?p=home. Even if it displays the same page as index.php no calendar does appear.
Here is the code I use for changing the input.
<body onmousemove="resetTimer()" onload="startTimer();startTime();<?php if(isset($_GET['p']) AND $_GET['p']=='monitoring'){echo 'ajax();' ;}; ?>changefield()">
<!-- Script DATE -->
<script>
$(function() {
$("input[type=date]").replaceWith("<input type='text' class='datepicker'/>");
$( ".datepicker" ).datepicker({
changeMonth: true,
changeYear: true,
showWeek: true,
beforeShowDay: '',
showAnim: "show"
});
});
</script>
I really do not know how to find an issue to this problem.
Receive all my utmost Respect.
Kind Regards.
SP.
Upvotes: 0
Views: 678
Reputation: 1631
Your code should work...
maybe you don't include the jquery-ui script ?
Upvotes: 1