Our powerful JS Calendar component


Post by j.hemelaers »

Hi,

Is it planned in the future that when you use the eventType fields, that on create of an event the fields will directly dynamicaly displayed based on the eventType that you select?
As for now whem i use 2 type of eventTypes and for each eventType i configure different fields. Then on create of an event just the default form is displayed. So first i need to save the event with a selected eventType, and then i have to open the event again for a second time to see the custom fields for that event.

Attachments
2020-07-28 17_57_48-bryntum-calendar – calendarConfig PhpStorm.png
2020-07-28 17_57_48-bryntum-calendar – calendarConfig PhpStorm.png (9.99 KiB) Viewed 2620 times
2020-07-28 18_00_07-Bryntum Calender Demo.png
2020-07-28 18_00_07-Bryntum Calender Demo.png (22.75 KiB) Viewed 2620 times
2020-07-28 18_00_32-Bryntum Calender Demo.png
2020-07-28 18_00_32-Bryntum Calender Demo.png (26.22 KiB) Viewed 2620 times

Post by Animal »

Yes, this will be fixed in the next release: https://github.com/bryntum/support/issues/1228


Post by j.hemelaers »

I believe that the issue is allready fixed what is discribed there.
It was version 1.0.1. I downloaded this version and tested what was discribed in the ticket. And now that works.
This is an other issue. It's not about dissapearing fields when you switch clicking existing events.
They just are not showing on creation.


Post by Maxim Gorkovsky »

Hello.
Is your complaint about editor fields not being hidden/shown when event type is changed in the editor? Like in this scheduler demo? https://bryntum.com/examples/scheduler/eventeditor/
I opened ticket to improve this behavior: https://github.com/bryntum/support/issues/1257


Post by j.hemelaers »

Hi,

Yes indeed. In the demo you mentioned you can see the custom fields toggling when changing the eventType :)


Post by dongryphon »

Looks like the docs needed adjusting. Try this when you get a chance?

   items: {
       eventTypeField : {   // this must be "eventTypeField" not "eventType"
           name : 'eventType',   // this must match the field name that holds the event type
           // ... 
       }
   }

Also, the eventType field must be declared on your model class since it is not a standard field:

    class MyEvent extends EventModel {
        static get fields() {
            return [
                { name : 'eventType' }
            ];
        }
    }

Post by j.hemelaers »

Hi,

Thanks for the answer. This way of using works like i wanted!

Thank you!


Post Reply