how to compare date from timepicker with the current time
I use timepicker() to get both of the day and开发者_如何学C the time. Now I want to know if that moment(date+time) is already passed or not. You should know that I am passing these values to my controller with ajax. So I will get them as strings. How can I convert this string to date so that I can compare it ?
The simplest way is, to convert the date and time into milliseconds and then comepare these on server side.
Use ISO 8601 dates throughout, and compare them alphabetically.
精彩评论