Our powerful JS Calendar component


Post by SHQK »

I have a custom readOnly textbox in Event Edit,
So I want every I change the value in Combobox, I want to biding the value simultaneously from this Combobox to textbox.
It near the same as two way binding in Angular.
How can I doing like that?

Attachments
bidingservice.PNG
bidingservice.PNG (14.25 KiB) Viewed 886 times

Post by alex.l »

All the best,
Alex


Post by SHQK »

alex.l wrote: Thu May 20, 2021 2:22 pm

To change another field value please subscribe on https://bryntum.com/docs/calendar/#Core/widget/Combo#event-change
event for your combo and do it manually.
You can add listener using field config (see https://bryntum.com/docs/calendar/#Calendar/guides/customization/eventedit.md#customizing-the-fields)
or in https://bryntum.com/docs/calendar/#Calendar/feature/EventEdit#event-beforeEventEditShow handler

Hi Alex,
I can't apply this docs, can you give me example in my case,
I have a Combobox and textbox in attachment,
So how can I biding value from Combobox to textbox everytime I change combo's value

Attachments
onchangeCombo.PNG
onchangeCombo.PNG (11.61 KiB) Viewed 862 times

Post by alex.l »

Try this:

eventEditService : {
    type : 'combo',
    name: 'services',
    [...]
    listeners : {
        change ({ value, source }) {
            source.parent.widgetMap.bindedEditServiceField.value = value;
        }
    }
}

All the best,
Alex

All the best,
Alex


Post by SHQK »

Many many thanks Alex,
It's working


Post Reply