[VUE] Calendar fields based on eventType with eventType selector

Our powerful JS Calendar component


Post Reply
User avatar
j.hemelaers
Posts: 5
Joined: Wed Jul 22, 2020 12:05 pm

[VUE] Calendar fields based on eventType with eventType selector

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 (10.02 KiB) Viewed 118 times
2020-07-28 18_00_07-Bryntum Calender Demo.png
2020-07-28 18_00_07-Bryntum Calender Demo.png (22.87 KiB) Viewed 118 times
2020-07-28 18_00_32-Bryntum Calender Demo.png
2020-07-28 18_00_32-Bryntum Calender Demo.png (26.29 KiB) Viewed 118 times

User avatar
Animal
Core Developer
Core Developer
Posts: 120
Joined: Fri Oct 13, 2017 12:36 pm

Re: [VUE] Calendar fields based on eventType with eventType selector

Post by Animal »

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


User avatar
j.hemelaers
Posts: 5
Joined: Wed Jul 22, 2020 12:05 pm

Re: [VUE] Calendar fields based on eventType with eventType selector

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.


User avatar
Maxim Gorkovsky
Core Developer
Core Developer
Posts: 3212
Joined: Wed Jan 08, 2014 11:46 am

Re: [VUE] Calendar fields based on eventType with eventType selector

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


User avatar
j.hemelaers
Posts: 5
Joined: Wed Jul 22, 2020 12:05 pm

Re: [VUE] Calendar fields based on eventType with eventType selector

Post by j.hemelaers »

Hi,

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


User avatar
dongryphon
Core Developer
Core Developer
Posts: 17
Joined: Tue Dec 24, 2019 5:38 pm

Re: [VUE] Calendar fields based on eventType with eventType selector

Post by dongryphon »

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

Code: Select all

   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:

Code: Select all

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

User avatar
j.hemelaers
Posts: 5
Joined: Wed Jul 22, 2020 12:05 pm

Re: [VUE] Calendar fields based on eventType with eventType selector

Post by j.hemelaers »

Hi,

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

Thank you!


Post Reply