I have the below fields in UI
- Appointment Date
04/13/2013 - Start Time
13:00 - End Time
14:30
The current database design is
- AppointmentDate
SMALLDATETIMEEx value04-13-2013 - Start Time
SMALLDATETIMEEx value04-13-2013 13:00 - EndTime
SMALLDATETIMEEx value04-13-2013 14:30
I designed a class for this model
public class Appointment
{
DateTime? AppointmentDate{get;set;}
DateTime? StartTime{get;set;}
DateTime? EndTime{get;set;}
}
I use ASP.Net MVC 4 and
@Html.TextBox("", m.StartTime.ToString("HH:mm"))
Added jQuery validation plugin and i get validation message 14:30 is not a valid date.
What changes i can implement in UI/DataBase/Validation to handle time entry?
I am using SQL Server 2008