I have one date time picker in my project.
in that i validate the choose day always be monday.
for that i written a code that is working fine.my code as follows;
private void dt_startweek_ValueChanged(object sender, EventArgs e)
{
if (dt_startweek.Value.DayOfWeek != DayOfWeek.Monday)
{
MessageBox.Show("Please Select MONDAY Only", "Monday Not Selected", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
}
user select any other day other than the MONDAY message will shows Please Select MONDAY Only.
when user press ok button.the message pop will close, ok,that is correct.
but calendar(datetimepciker also closed);
i don't want to visible the datetimepicker (calendar) gets closed when press ok button in the message.
how can i do using c#.
it is windows appplication.