I have added the unobtrusive.. etc all works except if i have GreaterThan on my second date field
StartDate: 2017/02/25 12:00 AM End Date: 2017/02/25 01:03 PM
it seems to think that the End Date is not greater, i assume its doing a string comparison vs a proper date because that is a valid range as the end date is greater than the start but if we are doing a string compare of that then the end date is not greater
here is my code
[Required]
[DataType(DataType.DateTime)]
[Display(ResourceType = typeof(DisplayResources), Name = "StartDateTime")]
public DateTime StartDateTime { get; set; }
[Required]
[DataType(DataType.DateTime)]
[Display(ResourceType = typeof(DisplayResources), Name = "EndDateTime")]
[GreaterThan("StartDateTime")]
public DateTime EndDateTime { get; set; }
`
update this is the component i am using https://eonasdan.github.io/bootstrap-datetimepicker/ which uses moment.js for its date formats