simonusher3
posted this
07 August 2020
Hi Yannis,
The date function works off your local settings, so the date to me always displays as DD/MM/YYYY been in the UK but, this can change on your hosting server settings and display in american format. To make sure everybody get the same format, you will need to use the JQuery datepicker plugin. I wouldn't bother reading the instructions to use plugins with nicepage as non of them worked for me, had to edit the HTML file directly so, here we go:
At the bottom of the HTML file you need to look for `` and after that you need to Cut & Paste the following:
<script class="u-script" type="text/javascript" src="nicepage.js" defer=""></script>
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
cript src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script>
$("input[type=date]").datepicker({
dateFormat: 'yy-mm-dd',
onSelect: function(dateText, inst) {
$(inst).val(dateText);
}
});
$("input[type=date]").on('click', function() {
return false;
});
</script>
At the top of the HTML, within the <head>
you need to look for any links to .js files, delete thoses. Now you need to Cut & Paste after ``
You should now have the format in DD/MM/YY.
To the developers, could you please add all JS files after the body, this way, plugins can be used.
Regards,
Simon..
Hi Yannis,
The date function works off your local settings, so the date to me always displays as DD/MM/YYYY been in the UK but, this can change on your hosting server settings and display in american format. To make sure everybody get the same format, you will need to use the JQuery datepicker plugin. I wouldn't bother reading the instructions to use plugins with nicepage as non of them worked for me, had to edit the HTML file directly so, here we go:
At the bottom of the HTML file you need to look for `` and after that you need to Cut & Paste the following:
<script class="u-script" type="text/javascript" src="nicepage.js" defer=""></script>
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
cript src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script>
$("input[type=date]").datepicker({
dateFormat: 'yy-mm-dd',
onSelect: function(dateText, inst) {
$(inst).val(dateText);
}
});
$("input[type=date]").on('click', function() {
return false;
});
</script>
At the top of the HTML, within the `<head>` you need to look for any links to .js files, delete thoses. Now you need to Cut & Paste after ``
You should now have the format in DD/MM/YY.
To the developers, could you please add all JS files after the body, this way, plugins can be used.
Regards,
Simon..
Last edited 07 August 2020 by simonusher3