Tagged: Time format
This topic contains 5 replies, has 2 voices, and was last updated by kiwioz 7 years, 6 months ago.
-
AuthorPosts
-
May 20, 2017 at 8:14 am #73927
Hi
I am in Australia and I have set the date to be European but I am needing American time i.e 6:00 am – 5:00 pm and not military time.
How can I do this?
Craig
-
May 22, 2017 at 3:19 pm #73931
Try this – add the following to “Custom JS” section of Options.
scheduler.config.hour_date = “%g:%i %a”;
scheduler.templates.event_date = function(date){
var formatFunc = scheduler.date.date_to_str(scheduler.config.hour_date);
return formatFunc(date);
}
-
May 22, 2017 at 3:33 pm #73933
Hi Ken,
After adding the code the Calendar is not rendering.
I duplicated the Default options and changed the date format to European and added your custom JS code.
Could you try it on your end or have I missed something?
Craig
PS Thanks for you help.
-
May 22, 2017 at 3:38 pm #73935
The forum seems to be curling the quotes by accident. Make sure you’re using straight quotes as described on this page.
-
May 22, 2017 at 3:47 pm #73936
Thanks Mate,
Got it.
-
May 25, 2017 at 5:49 am #73946
Hi Ken
I have done some more debugging on this issue, I have found that when I set the date to be European and using the Custon JS code to change the time to American the time field still shows European time. See image 1
Steping though the debuger, when dragging and hitting the “Else If [ $event_type=”Edit” ]” step.
Set Field By Name [ $toc & $date_start_field ; GetAsDate($from) ]
Set Field By Name [ $toc & $date_end_field ; GetAsDate($to) ]
Set Field By Name [ $toc & $time_start_field ; If ($untimed; GetAsTime(“”);GetAsTime($from)) ]
Set Field By Name [ $toc & $time_end_field ; If ($untimed; GetAsTime(“”);GetAsTime($to)) ]
Set Field By Name [ $toc & $event_unit_field ; $unit ]
Set Field By Name [ $toc & $show_only_field ; 1 ]
They are not setting the corect format. I have chage this code to
Set Field By Name [ $toc & $date_start_field ; GetAsDate($from_utc) ]
Set Field By Name [ $toc & $date_end_field ; GetAsDate($to_utc) ]
Set Field By Name [ $toc & $time_start_field ; If ($untimed; GetAsTime(“”);GetAsTime($from_utc)) ]
Set Field By Name [ $toc & $time_end_field ; If ($untimed; GetAsTime(“”);GetAsTime($to_utc)) ]
Set Field By Name [ $toc & $event_unit_field ; $unit ]
Set Field By Name [ $toc & $show_only_field ; 1 ]
This has no affect. I have added the dataviwer with the list of veriables.
I really need to come up with a solution for this
Craig
Attachments:
You must be logged in to view attached files. -
AuthorPosts
You must be logged in to reply to this topic.