JQuery Datepicker along with dateformat -
am kinda new @ jquery datepicker. want allow user select fromdate based on todate datepicker min&max date set. need utilize dd/mm/yy format. when utilize functionality in onchange vanishes. can any1 help me ? below works perfect unable implement datepicker in dd/mm/yy format
$("#date_fromdate").datepicker({ defaultdate: "+1w", changemonth: true, numberofmonths: 1, mindate: firstdate, maxdate: lastdate, onclose: function (selecteddate) { $("#date_todate").datepicker("option", "mindate", selecteddate); var choosendate = new date(selecteddate); var choosendatequarter = math.floor((choosendate.getmonth() / 3)); var choosendatequarterstartdate = new date(choosendate.getfullyear(), choosendatequarter * 3, 1); var choosendatequarterenddate = new date(choosendatequarterstartdate.getfullyear(), choosendatequarterstartdate.getmonth() + 3, 0); lastdate = choosendatequarterenddate; $("#date_todate").datepicker("option", "maxdate", choosendatequarterenddate); } }); $("#date_todate").datepicker({ defaultdate: "+1w", changemonth: true, numberofmonths: 1, mindate: firstdate, maxdate: lastdate, onclose: function (selecteddate) { $("#date_fromdate").datepicker("option", "maxdate", selecteddate); }
try with:
$("#date_todate").datepicker("option", "dateformat", "dd/mm/yy");
or
$("#date_todate").datepicker({ dateformat: "dd/mm/yy" });
jquery datepicker
No comments:
Post a Comment