We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How can I modify fields in an event?

Thread ID:

Created:

Updated:

Platform:

Replies:

141767 Jan 3,2019 09:58 AM UTC Jan 4,2019 05:51 AM UTC ASP.NET MVC - EJ 2 1
loading
Tags: Schedule
Daniel Martinez
Asked On January 3, 2019 09:58 AM UTC

Hello,
I need modify differents fields in the events.

Syncfusion_schedule_event_modal

Karthigeyan Krishnamurthi [Syncfusion]
Replied On January 4, 2019 05:51 AM UTC

Hi Daniel, 
 
Thank you for contacting Syncfusion support. 
 
Default editor fields can be customized using CSS and PopupOpen event. We have prepared the same as below sample for your refernce. 
 
@Html.EJS().Schedule("schedule").ShowQuickInfo(false).Width("100%").Height("650px").PopupOpen("onPopupOpen").Render() 
 
<style> 
    .e-all-day-container { 
        display: none; 
    } 
    .e-time-zone-container { 
        display: none; 
    } 
    .e-description-container { 
        display: none; 
    } 
    .e-control.e-recurrenceeditor.e-lib { 
        display: none; 
    } 
</style> 
 
<script type="text/javascript"> 
    function onPopupOpen(args) { 
        if (args.type === 'Editor') { 
            // Create required custom elements in initial time 
            if (!args.element.querySelector('.custom-field-row')) { 
                var row = ej.base.createElement('div', { className: 'custom-field-row' }); 
                var formElement = args.element.querySelector('.e-schedule-form'); 
                formElement.firstChild.insertBefore(row, args.element.querySelector('.e-title-location-row')); 
                var container = ej.base.createElement('div', { className: 'custom-field-container' }); 
                var inputEle = ej.base.createElement('input', { 
                    className: 'e-field', attrs: { name: 'EventType' } 
                }); 
                container.appendChild(inputEle); 
                row.appendChild(container); 
                var drowDownList = new ej.dropdowns.DropDownList({ 
                    dataSource: [ 
                        { text: 'Public Event', value: 'public-event' }, 
                        { text: 'Maintenance', value: 'maintenance' }, 
                        { text: 'Commercial Event', value: 'commercial-event' }, 
                        { text: 'Family Event', value: 'family-event' } 
                    ], 
                    fields: { text: 'text', value: 'value' }, 
                    value: (args.data).EventType, 
                    floatLabelType: 'Always', placeholder: 'Event Type' 
                }); 
                drowDownList.appendTo(inputEle); 
                inputEle.setAttribute('name', 'EventType'); 
            } 
        } 
    } 
</script> 
 
We can display the custom editor instead of default editor and kindly refer the below link. 
 
Regards, 
Karthigeyan 



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon