I have a code that runs to select a date from calender, but I want to set the current_date to that of the server in the mentioned calender. And with a functionality that compares client_date with server_date.
I have a code that runs to select a date from calender, but I
Share
That’s possible. As suggested elsewhere, you should convert the dates to strings for two reasons:
To send the current date to the client, you can use a hidden form field or an AJAX request or a web service or REST or JSON or JSONP or … well, there are too many methods to do it.
To compare dates, convert the string to a
Dateobject and then use the usual methods to compare them (compareTo()in Java and<,==,>in JavaScript).