TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Goran Bibic
476
2.9k
201.9k
Remove min and max value datetimepicker
Mar 24 2018 3:42 PM
After put inside this code
// don't convert it to datetime (as you said, it may be null)
var stringValue = (prijava_radnikaDataGridView.SelectedRows[0].Cells[
"dataGridViewTextBoxColumn3"
].Value);
var dateValue = string.IsNullOrEmpty(Convert.ToString(stringValue)) ? DateTime.MinValue : Convert.ToDateTime(
"2018-01-01 00:00:00"
);
// now, datevalue is the new value for datepicker
if
(string.IsNullOrEmpty(Convert.ToString(stringValue))) vrijemeodjaveDateTimePicker.Value = dateValue;
I have error
Activated Event Time Duration Thread
Exception thrown:
'System.ArgumentOutOfRangeException'
in System.Windows.Forms.dll (
"Value of '1.1.0001. 00:00:00' is not valid for 'Value'. 'Value' should be between 'MinDate' and 'MaxDate'."
) 14.33s [17640] <No Name>
Reply
Answers (
4
)
Setup default value if is datetimepicker in sql column null
How to Disable the screenshot in Xamarin.Forms iOS.