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

Our pure JavaScript Scheduler component
Post Reply
User avatar
tomy.chen
Posts: 4
Joined: Tue May 14, 2019 3:15 am

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

Post by tomy.chen » Wed Jun 12, 2019 2:27 pm

https://www.bryntum.com/docs/scheduler/#Common/widget/Checkbox

Code: Select all

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

User avatar
mats
Core Developer
Core Developer
Posts: 14131
Joined: Sat Dec 19, 2009 11:41 pm
Location: Sweden
Contact:

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

Post by mats » 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.
Tired of debugging javascript errors in web applications? Try our new error logging service RootCause, or read more on the Sencha blog

@bryntum
Facebook
API documentation

User avatar
tomy.chen
Posts: 4
Joined: Tue May 14, 2019 3:15 am

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

Post by tomy.chen » Wed Jun 19, 2019 3:21 am

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.

User avatar
pmiklashevich
Core Developer
Core Developer
Posts: 1728
Joined: Fri Apr 01, 2016 11:08 am

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

Post by pmiklashevich » Wed Jun 19, 2019 12:03 pm

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 3 times
Radio.js.zip
(5.08 KiB) Downloaded 4 times
Pavel Miklashevich - Core Developer

User avatar
tomy.chen
Posts: 4
Joined: Tue May 14, 2019 3:15 am

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

Post by tomy.chen » Thu Jun 20, 2019 7:24 am

pmiklashevich,

Thanks a lot!

Regards,
Tomy

Post Reply