Hi guys,
I've setup a datepicker, it's showing the selected date properly but I'm having a hard time in sending it towards my controller in the same format it's showing. For some reason it seems to be reverting back from dd/MM/yyyy to MM/dd/yyyy.
Below my script used.
01.
<script>
02.
var
datepicker;
03.
$(document).ready(
function
() {
04.
datepicker = $(
"#datepicker"
).data(
"kendoDatePicker"
);
05.
06.
$(
"#btnToReport"
).click(
function
() {
07.
$.post(
"/ShiftReport/ViewReport?datepicker="
+ datepicker.value().toLocaleString(),
function
(data, status) {
08.
if
(status ===
"success"
) {
09.
$(
"#main-content"
).html(data);
10.
11.
}
12.
});
13.
});
14.
});
15.
</script>