Page 1 of 1

Is it possible to implement radio type or other customized type in scheduler popup?

Posted: Wed Jun 12, 2019 2:27 pm
by tomy.chen
https://www.bryntum.com/docs/scheduler/#Common/widget/Checkbox
eventEdit: {
                autoClose:false,
                startDateConfig:{style:"flex: 1 0 70%;",label:vm.$data.startDateName},
                startTimeConfig:{style:"flex: 1 0 30%;"},
                endDateConfig:{style:"flex: 1 0 70%;",label:vm.$data.endDateName},
                endTimeConfig:{style:"flex: 1 0 30%;"},
                extraWidgets: createExtraWidgets(),
                showResourceField:false//Resource
            },
function createExtraWidgets() {
    var widgetsIndex = 7;
    var extraWidgets =[
        {
            type: '[b]checkbox[/b]',
            text: '日単位',
            name: 'unitDay',

Re: Is it possible to implement radio type or other customized type in scheduler popup?

Posted: Wed Jun 12, 2019 11:32 pm
by mats
We don't yet have a radio type widget. But our Popups can contain any widgets or HTML markup so you can freely create your own custom Widgets and include them in the EventEditor.

Re: Is it possible to implement radio type or other customized type in scheduler popup?

Posted: Wed Jun 19, 2019 3:21 am
by tomy.chen
Mats,
Thanks for your answer.
Are there any related resource or documents for implement a custom widgets?

Thanks and regards,
Tomy
mats wrote: Wed Jun 12, 2019 11:32 pm We don't yet have a radio type widget. But our Popups can contain any widgets or HTML markup so you can freely create your own custom Widgets and include them in the EventEditor.

Re: Is it possible to implement radio type or other customized type in scheduler popup?

Posted: Wed Jun 19, 2019 12:03 pm
by pmiklashevich
Hello Tomy,

We don't have a special guide of how to subclass our components and implement custom logic, but all our sources are the guide in this case. You can look at Checkbox class for example. It extends Field class which extends Widget. Radio field behavior is quite similar to checkbox, so you can copy the Checkbox class as a base and start changing it to make it a radio field. I've created a small proof of concept which shows how it can be implemented and a small demo which shows the usecase (see the attachment). Feel free to copy it to your project and start changing it to get what you need. Also I've created a feature request to have Radio field in our sources one day. Here is the ticket: https://app.assembla.com/spaces/bryntum/tickets/8744-create-radio-field-component/details

Best,
Pavel

Re: Is it possible to implement radio type or other customized type in scheduler popup?

Posted: Thu Jun 20, 2019 7:24 am
by tomy.chen
pmiklashevich,

Thanks a lot!

Regards,
Tomy