Welcome Guest Search | Active Topics | Sign In | Register

eo.web.datepicker Options
Jason
Posted: Wednesday, November 19, 2014 5:54:01 AM
Rank: Member
Groups: Member

Joined: 10/18/2010
Posts: 29
Hello

I have multiple date pickers in an asp.net gridview. I am having an issue at the moment where SQL server is throwing the following error:

The conversion of a nvarchar data type to a datetime data type resulted in an out-of-range value

I have googled this and I THINK its related to the fact that when the date pickers dont have a selected value, it is still passing 0001-01-01 through to the database (i can see this via Fiddler). this value is outside the range of the datetime type in sql server, therefore it throws an error

I have tried setting the EO.Web.DatePicker).SelectedDate = DateTime.MinValue, but it still attempts to pass 0001-01-01 through to the database

So my question is, what is the best way to deal with date pickers that do not have a selected date so that it does not attempt to pass a value outside the range of sql datetime?

thanks

Jason
Jason
Posted: Wednesday, November 19, 2014 8:01:41 AM
Rank: Member
Groups: Member

Joined: 10/18/2010
Posts: 29
Please disregard prev question, have found similar questions and answers on this forum. Will get back to you if none of those work

thanks
eo_support
Posted: Wednesday, November 19, 2014 9:39:50 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
Great. Thanks for the update.


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.