Forums

Calendar: disable minute selection mode

mauropiro 15 Oct, 2018
Dear Sirs,

According to the site: https://github.com/mdehoog/Semantic-UI-calendar, I tried to put in Extra attributes calendar field:data-disableMinute:falseordisableMinute:falseBut, none of them work to disable minute selection mode.

Please, help with that,

Thank you

Mauro
mauropiro 15 Oct, 2018
Sorry, correcting the merged text above:

--
I tried to put in Extra attributes calendar field:

data-disableMinute:false

or

disableMinute:false

But, none of them work to disable minute selection mode.
--

Thank you

Mauro
healyhatman 15 Oct, 2018
Wouldn't you want disableMinute:true ?
mauropiro 17 Oct, 2018
Dear Healyhatman

Sorry for the delay.

I want to disable the front end selection marked as red. I only need 'o'clocks' (full hours).



Thank you

Mauro
healyhatman 17 Oct, 2018
No I don't think there's a way built-in.
healyhatman 17 Oct, 2018
OKAY so there is a way built in, there's a "disableMinute" setting included with the calendar code, I'm just trying to figure out how to actually set it.
mauropiro 18 Oct, 2018
Thank you Healyhatman
healyhatman 18 Oct, 2018
I've sent an email to Max, we'll see if he gets back to me there or here on this post. I'm happy to work through and figure things out myself a bit I just need him to point me in the right direction or, better yet, just tell me straight up how to do it🙂
mauropiro 18 Oct, 2018
And I am happy to have helpful people supporting this great tool.

Thank you Healyhatman.
mauropiro 24 Oct, 2018
Dear Healyhatman

Did you get the max's answer about this case?

Thank you

Mauro
healyhatman 24 Oct, 2018
He said it doesn't currently support that and that he would have to look at the code at a later date.
I eould use the contact link up top to email him and say you also would like the ability to set additional settings using data- tags.

Or ask him to tell me where in the CF code the calendar settings get initialised🙂
healyhatman 24 Oct, 2018
1 Likes
GOT IT! Max told me where the initialisation is so here's what you do.

Step 1: Understand that until or unless Max makes this change on his end, this fix will be removed every time you update Chronoforms.

Step 2: Navigate to yoursite/libraries/cegcore2/assets/js/g2.boot.js

Step 3: After line 93 ("monthFirst:.......") add the following code (DON'T copy+paste, type it out manually Chronoforums adds hidden characters)
disableMinute: $(calfield).data('disableminute') ? $(calfield).data('disableminute') : false,
Make sure you have the comma at the end, and that you pay attention to the capitalisation as I've used it.

Step 4: In your calendar field, under advanced, put in
data-disableminute:true

DONE. This should also work with any of the other settings for Semantic-UI Calendar. https://github.com/mdehoog/Semantic-UI-Calendar
mauropiro 20 Nov, 2018
1 Likes
Dear Healyhatman

Sorry for the late reply, it worked perfectly.

Thanks you two.

Mauro
webix 23 Apr, 2019
1 Likes
Hi,

First of all thanks for solution - this works like a charm. But it would be great to have it implemented in core on your side to avoid change this every time after updates. Do you have already some idea when disabling minutes will be implemented in core?

Thanks
Alex
Max_admin 23 Apr, 2019
Hi Alex,

This has been added to the next update!

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
webix 23 Apr, 2019
1 Likes
Hi Max,

that's awesome news!

Thanks
Alex,
jckant 07 Oct, 2020
But in Chronoforms 7 it does not seem to work: although I disabled it by choosing DD/MM/YYYY as display format and as real format, it still shows the hours and minutes.
Kind regards,
Jan
Max_admin 07 Oct, 2020
The calendar field "Type" setting is set to Date ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Max_admin 08 Oct, 2020
it works fine here, please clear your browser's cache, make sure you have the latest update installed!

if still not working then please send me a backup of your form on the Contact page!
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
jckant 08 Oct, 2020
Cache cleared, latest update installed. After installing v7 it first worked well. I'll send you a form.
Max_admin 09 Oct, 2020
Answer
I found the issue, it's because your form has a Javascript error, which is caused by the wrong field mask value in the 2 fields up the form, once the mask is fixed or removed the calendar works fine!
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.