How do I change date/time format?
-
How do I change the date/time format from DD-MM-YYYY to MM-DD-YYYY?
-
Hi technodude88,
there is no any feature to change date/time format. if you are comfortable in code customization then i will instruct you
also share your site url.
Thanks
AbhishekAbhishek,
The site I am working on is for an internal intranet. I am very comfortable in code customization. I would appreciate any help you can offer me to switch the date time format.
Thanks again,
Chaseok what short-code you are using
I’m using
[APCAL]
/* these is for user interface */
1. go to in your plugin directory.
2. open appointment-calendar-shortcode.php
3. go to line number 209 and add these two line.var curtdate1 = jQuery.fullCalendar.formatDate(start,’MM-dd-yyyy’);
jQuery(‘#appdate1’).val(curtdate1);4. go to line number 416 and add these two line.
var todaydate1 = jQuery.fullCalendar.formatDate(new Date(),’MM-dd-yyyy’);
jQuery(‘#appdate1’).val(todaydate1);5 go to line number 650 and add this line.
document.getElementById(‘appdate1’).value = x;
6 go to line number 657 and add this line
<input name=”appdate1″ id=”appdate1″ type=”text” readonly=”” height=”30px;” style=”height:30px;” />/* these is for admin calendar */
1. go to in your plugin directory
2. select menu-pages folder.
3. open calendar.php file
4. go to line number 207 and add this linedocument.addnewappointment.appdate1.value = jQuery.datepicker.formatDate(‘mm-dd-yy’, new Date());
5. go to line number 218 and add these line
var seleteddate1 = jQuery.datepicker.formatDate(‘mm-dd-yy’, new Date(dateAsString));
document.addnewappointment.appdate1.value = seleteddate1;
6. go to line number 381 and add these lines
<input name=”appdate” id=”appdate” type=”hidden”/>
<input name=”appdate1″ id=”appdate1″ type=”text” disabled=”disabled” />i think it will work for you.
further any any query let me know
Thanks
AbhishekAbhishek,
Thanks for the help. I get an error on line 209 in “appointment-calendar-shortcode.php”
//Loading Events On Calendar Start global $wpdb; var curtdate1 = jQuery.fullCalendar.formatDate(start,'MM-dd-yyyy'); jQuery('#appdate1').val(curtdate1); $EventTableName = $wpdb->prefix."ap_events";This is line number problem. ok this is new instruction with fresh plugin directory
/* these is for user interface */
1. go to in your plugin directory.
2. open appointment-calendar-shortcode.php
3. go to line number 353 add these two line. or search comment line
//Modal Form Works – show frist modalvar todaydate1 = jQuery.fullCalendar.formatDate(new Date(),’MM-dd-yyyy’);
jQuery(‘#appdate1’).val(todaydate1);4. go to line number 581 and add these lines.
var y = document.getElementById(‘date1’).value;
y = moment(y).format(‘MM-DD-YYYY’);
document.getElementById(‘appdate1’).value = y;
5.go to line number 595 and replace current input text with these lines
<input name=”appdate1″ id=”appdate1″ type=”text” readonly=”” height=”30px;” style=”height:30px;” />
<input name=”appdate” id=”appdate” type=”hidden” readonly=”” height=”30px;” style=”height:30px;” />
6. search <Available Time For> and here chnage date format d-m-Y to m-d-y/* these is for admin calendar */
1. go to in your plugin directory
2. select menu-pages folder.
3. open calendar.php file
4. go to line number 207 and add this line
document.addnewappointment.appdate1.value = jQuery.datepicker.formatDate(‘mm-dd-yy’, new Date());5. go to line number 218 and add these line
var seleteddate1 = jQuery.datepicker.formatDate(‘mm-dd-yy’, new Date(dateAsString));
document.addnewappointment.appdate1.value = seleteddate1;
6. go to line number 381 and replace current input text with these linesit will work if any issue let me know again
Thanks
AbhishekHi I’m having same issue; need to change date format to Month Day Year in First Modal. In my appointment-calendar-shortcode.php //Modal Form Works – show frist modal, comes in at line 701, and I’m not sure where to add step 4
Thanks in advance
Hi djeweb,
please download fresh plugin and then you have no confusion with line number and steps in instruct format .
Thanks
AbhishekYou Rock! Thank you!!!
The topic ‘How do I change date/time format?’ is closed to new replies.