Our pure JavaScript Scheduler component


Post 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',

Post 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.

Post 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.

Post 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
Attachments
demo.zip
(1.72 KiB) Downloaded 134 times
Radio.js.zip
(5.08 KiB) Downloaded 143 times

Pavlo Miklashevych
Sr. Frontend Developer


Post by tomy.chen »

pmiklashevich,

Thanks a lot!

Regards,
Tomy

Post Reply