Config.repeat_date

Hi,

I use scheduler, an i try to configure the format of date end of event recurring to ‘%d/%m/Y’.

I set : scheduler.config.repeat_date = “%d/%m/%Y”;

but the config is not loaded, it always the format by default …

The other paramters are ok, but not repeat_date … I don’t understand …

I have missed anything ? Can you help me ?

See my config :

                scheduler.plugins({
                    recurring: true,
                    readonly: false,
                    limit: true,
                    year_view: true,
                    key_nav: true,
                    minical: true,
                    active_links: true,
                    serialize: true
                });

                scheduler.config.lightbox.sections=[
                    {name:"description", height:70, map_to:"text", type:"textarea", focus:true},
                    {name:"recurring", height:115, type:"recurring", map_to:"rec_type", button:"recurring"},
                    {name:"time", height:72, type:"calendar_time", map_to:"auto"}
                ];

                scheduler.config.include_end_by = true;
                scheduler.config.repeat_precise = true;
                scheduler.config.date_format = "%m/%d/%Y %H:%i";
                scheduler.config.repeat_date = "%d/%m/%Y";
                scheduler.config.limit_start = new Date();
                scheduler.i18n.setLocale("fr");
                scheduler.init('scheduler_availabilities', new Date(), "year");

                scheduler.attachEvent("onDataRender", function () {
                    update_stat();
                });

                scheduler.parse(<?php echo $block->getAvailabilitiesValue(); ?>, 'json');

I have continued my test.

if I use the config scheduler.config.repeat_date ="%d/%m/%Y";

I write the date end series to 30/09/2022 (30 sept 2022), after save the serie, the scheduler have save the date at 09/05/2024

If I use a config scheduler.config.repeat_date ="%d-%m-%Y"; with - as /

The save not change the format of date. but in france, the date is currently used with / as separator.

It s a bug, or it is a miss at my part ?

Hello,
Thank you for your notice of incorrect work with the repeat_date config. I’ve submitted it to our internal bug tracker. The dev team will fix it in the future, but I cannot give you any ETA.
As a workaround, you can add scheduler.config.parse_exact_format with true value to apply the exact format you specified.
Please check the following snippet:
https://snippet.dhtmlx.com/bvknli45

Hello @Jerome_STEIGER,

This issue was fixed in 6.0.1 version:
https://docs.dhtmlx.com/scheduler/what_s_new.html#601

Kind regards,

1 Like

Good, it’s fine !!!

Thanks you !!