Premium support for our pure JavaScript UI components


Post by alex.l »

import RecurrenceStopConditionCombo from '../../lib/Scheduler/view/recurrence/field/RecurrenceStopConditionCombo.js';
import Override from '../../lib/Core/mixin/Override.js';

All the best,
Alex


Post by tobias.aires »

I did what you told to do, but as default value stills "never". How can i change this?

Attachments
Screenshot from 2023-05-04 11-16-48.png
Screenshot from 2023-05-04 11-16-48.png (30.28 KiB) Viewed 243 times

Post by mats »

Try using this to change the label:

features : {
        stripe       : true,
        dependencies : false,
        taskEdit     : {
            items : {
                recurrenceTab : {
                    items : {
                        recurrenceEditor : {
                            items : {
                                frequencyField : {
                                    label : 'Custom Label'
                                }
                            }
                        }
                    }
                }
            }
        }
    },

Post by tobias.aires »

It worked! But i'm still trying to remove the default value "never" on stopRecurrenceField. I've tried to use value, defaultValue, placeholder, but nothing seems to work


Post by Animal »

You can't "remove" it. You can localize it.

There are three possible options and they are localizable:

            { value : 'never', text : this.L('L{Never}') },
            { value : 'count', text : this.L('L{After}') },
            { value : 'date',  text : this.L('L{On date}') }

The default is that the recurrence never stops. It will always be there no matter how far into the future you render your Scheduler.

Or you can stop after a count, or on a date.


Post by tobias.aires »

Is it possible to set "count" as default?


Post by tobias.aires »

One more thing, the daysCombo field is showing an option to non working days. How can i disable that option?


Post by tasnim »

Hi,

There is a thread related to disabling an item of a combo here viewtopic.php?p=123313#p123313
Hope this will help.


Post by tobias.aires »

I can remove the never option on my select, but i'm trying to remove this never value as default of RecurrenceStopConditionCombo

Attachments
Screenshot from 2023-05-05 10-48-32.png
Screenshot from 2023-05-05 10-48-32.png (54.89 KiB) Viewed 226 times

Post by tobias.aires »

As you can see, i did exactly as the other forum post told. But not what i expected

Attachments
Screenshot from 2023-05-05 10-53-57.png
Screenshot from 2023-05-05 10-53-57.png (20.07 KiB) Viewed 226 times
Screenshot from 2023-05-05 10-52-56.png
Screenshot from 2023-05-05 10-52-56.png (52.72 KiB) Viewed 226 times

Post Reply