Date Picker - Only Current Month
Restrict jquery date picker to only current month:
Method-1:
HTML:
<input type="text" id="calendar"/>
Script:
<script type="text/javascript">
$('#calendar').datepicker({
changeMonth: false,
stepMonths: 0,
dateFormat: "mm/dd/yy",
firstDay: 1,
}).datepicker("setDate", "+0d" );
</script>
Method-2:
HTML:
<input type='text' id='date'>
Script:
<script type="text/javascript">
$('#date').datepicker( {
changeMonth: false,
changeYear: false,
stepMonths: false,
dateFormat: 'dd/mm'
});
</script>
Method-1:
HTML:
<input type="text" id="calendar"/>
Script:
<script type="text/javascript">
$('#calendar').datepicker({
changeMonth: false,
stepMonths: 0,
dateFormat: "mm/dd/yy",
firstDay: 1,
}).datepicker("setDate", "+0d" );
</script>
Method-2:
HTML:
<input type='text' id='date'>
Script:
<script type="text/javascript">
$('#date').datepicker( {
changeMonth: false,
changeYear: false,
stepMonths: false,
dateFormat: 'dd/mm'
});
</script>
Comments
Post a Comment