I have a datepicker which works, but I am trying to convert it to a date object so that i could getDay from it. Problem is everytime i convert it, it gives me the wrong format, as in it will be MM/dd/yy, rather than dd/MM/yy.
<script type="text/javascript">
$(document).ready(function () {
$('#<%=txtDateTime.ClientID%>').datepicker({
dateFormat: 'dd/mm/yy',
onSelect: function (date) {
alert(new Date(Date.parse(date))); //this keeps giving month/day/year
}
});
});