Calendar open on the input focus in the editing grid

Hi,
I want to open the calendar open on the input focus.
Not a calendar icon click.
please my grid is the editing mode.

Please check my snapshot and code are attached

Attachment: Calendar_open_on_the_input_9219b35d.zip

3 Replies 1 reply marked as answer

VS Vignesh Sivagnanam Syncfusion Team May 3, 2021 12:36 PM UTC

Hi Rizwan 

Greetings from Syncfusion support 

Based on your query you want to open the calendar component when you focus on the input element in the grid edit. We have prepared a sample to render the calendar component using cell edit template and open the calendar using the focus event and Show method of EJ2 Calendar component. 

Please refer the below code example and sample for your reference, 

function write(args) { 
      dObj = new ej.calendars.DatePicker({ 
        value: new Date(args.rowData[args.column.field]), 
        placeholder: 'Select DateTime', 
        focus: function () { 
          dObj.show(); 
        }, 
      }); 
      dObj.appendTo(elem); 
    } 
 

Regards 
Vignesh Sivagnanam 


Marked as answer

RI Rizwan May 4, 2021 05:38 AM UTC

Thank you,
it's working fine


VS Vignesh Sivagnanam Syncfusion Team May 5, 2021 09:28 AM UTC

Hi Rizwan 

Thanks for the update 

We are happy to hear that the provided solution works fine at your end. 

Please get back to us if you need any further assistance. 

Regards, 
Vignesh Sivagnanam 


Loader.
Up arrow icon