CodeDocu.com

Show DevExpress DateBox calendar as a year selection

 

 

By setting DevExteme(). DateBox(). CalendarOptions you can set the selection control as a calendar object with selection of year

 

                .CalendarOptions(

                    options=>options.ZoomLevel(CalendarZoomLevel.Year)

                    .MaxZoomLevel(CalendarZoomLevel.Decade)

                    .MinZoomLevel(CalendarZoomLevel.Decade)               

                )

 

 

 

    <div class="dx-field">

        <div class="dx-field-label">Date List</div>

        <div class="dx-field-value">

            @(Html.DevExtreme().DateBox()

                .DisplayFormat("MMM yyyy")

                .Value(DateTime.Now)

                .CalendarOptions(

                    options=>options.ZoomLevel(CalendarZoomLevel.Year)

                    .MaxZoomLevel(CalendarZoomLevel.Decade)

                    .MinZoomLevel(CalendarZoomLevel.Decade)               

                )

            )

        </div>

    </div>

 

Show DevExpress DateBox calendar as a year selection or Month Selection

 

 

When switching to CalenderarZoomLevel.Decade, the selection above the years is always switched per 10 years

Show DevExpress DateBox calendar as a year selection or Month Selection

 

CalendarZoomLevel.Century

Show DevExpress DateBox calendar as a year selection or Month Selection

 

CalendarZoomLevel.Month

Show DevExpress DateBox calendar as a year selection or Month Selection

 

Display as a month selection of a year

 

    <div class="dx-field">

        <div class="dx-field-label">Date List</div>

        <div class="dx-field-value">

            @(Html.DevExtreme().DateBox()

                .DisplayFormat("MMM yyyy")

                .Value(DateTime.Now)

                .CalendarOptions(

                    options=>options.ZoomLevel(CalendarZoomLevel.Year)

                )

            )

        </div>

    </div>

 

Show DevExpress DateBox calendar as a year selection or Month Selection


Software Entwicklung Stuttgart Nürtingen
Suche Projekte C#, WPF, Windows App,ASP.Net, vb.Net, WinForms, SQL Server, Access, Excel