This is a migrated thread and some comments may be shown as answers.

DateInput wrapper doesn't support nullable DateTime

2 Answers 129 Views
Date/Time Pickers
This is a migrated thread and some comments may be shown as answers.
Brian
Top achievements
Rank 1
Brian asked on 30 Jun 2017, 11:57 PM

The DateInput server side wrapper does not appear to work with nullable DateTimes. In the below code, if 'TaxDate' is a nullable DateTime when the page is rendered the control will always display 'month/day/year' (as it does when the value is null) even if the value being passed to it isn't null.

I tried setting the .value() property on the control but it does not accept nullable DateTimes.

 

                @(Html.Kendo().DateInput()
                            .Name("TaxDate")
                            .HtmlAttributes(new { style = "width:100%;", @class = "autoSelectText" })

 

From the demo page it looks as if null is a supported state, does the server side wrapper not support it?

 

Thanks,

Brian

 

2 Answers, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 05 Jul 2017, 01:15 PM
Hello Brian,

I am afraid that currently the DateInput works with DateTime only. I have logged an issue and the developers should add the improvement to the component as soon as possible. You can monitor the status of the issue in the link below.


As a token of gratitude for reporting the missing feature you will find your points updated. I apologize for any inconvenience this issue may cause you.

Regards,
Viktor Tachev
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Brian
Top achievements
Rank 1
answered on 06 Jul 2017, 11:41 PM

Thanks Viktor.  I'll follow the issue on github for updates.

 

 

Tags
Date/Time Pickers
Asked by
Brian
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Brian
Top achievements
Rank 1
Share this question
or