Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
55
How do i enable month and year for Datepicker in ASP.net MVC iggrid?
posted

Hello Infragistics community, 

I'm using an ASP.Net MVC igGrid. I want my grid to have following behavior

I have a date column in the mvc iggrid to select the start date of a company

            column.For(x => x.dtDate).Format("dd-MMM-yyyy").HeaderText("Date").Width("15%"); //Date

For the column settings I have this code:

cs.ColumnSetting().ColumnKey("dtDate").EditorType(ColumnEditorType.DatePicker).Required(true)

This displays a calendar to select the date but it doesn't have an option to select the month and year. Otherwise it will be difficult to navigate to particular year and month.

How to achieve this in the my MVC grid. 


Any assistance would be greatly appreciated, thanks

Parents
No Data
Reply
  • 15320
    Offline posted

    Hello Kumar,

    In order to be able to select month and year from the datepicker, you should define the following editor options:

    datepickerOptions: {
                    		changeYear: true,
                        changeMonth: true,
                        }

    In your case you should define datepickerOptions for the MVC wrapper.

    Please let me know if you need further assistance.

    Regards,

    Tsanna

Children