Discuss anything related to web development but no technical support questions


Post by Stanleyliu1006 »

Hi

I am trying to hide endTime in the Sch.plugin.EditorWindow. And my code is as below, which defined in editorConfig.
        endTimeConfig : {
            minValue : '00:00',
            maxValue : '24:00',
            hidden   : true,
        },

Unfortunately It's not working, it works fine for endDate, if i put hidden in the endDateConfig

I even try your eventEditor demo, it's not working either. Can you please specify how can i hide the end time in the Editor plugin? Thanks


Kind regards
Stanley

Post by pmiklashevich »

Hello Stanley,

Start time field and End time field depend on eventRecord.getAllDay() value. If your event is all day record, it sets allDayField to true state and changes visibility of start/end time fields, so they a hidden (even if allDayField is hidden). Non-allday events always have time fields visible. So I can advice just provide "AllDay" : true to your data. You can also override Sch.widget.EventEditor.toggleAllDayFields to an empty function, if you don't want to see time fields permanently. But this might break EventEditor logic, since time fields won't be available and you cannot change time of non-allday events.

Best regards,
Pavel

Pavlo Miklashevych
Sr. Frontend Developer


Post Reply