Hi,
I have a field in HTML which accepts user inputs. But according to my application, it should accept only date values.
So, first I have to validate the value that it should be a valid date value and next, if the input is a valid date value, then it should automatically get converted into the format specified in system's locale.
I tried using :-
-
(new Date()).toDateString();
-
But it returns the date in the following format:-
Mon Sep 24 2007
I don't want this format. I want the date exactly in following format:-
Sep 24, 2007
I think, now the problem must be clear to all.