javascript dd/mm/yyyy to date object





Probably best to use a library like Date.js (although that hasnt been maintained in years) or Moment. js. But to do it manually, you can use DategetFullYear(), DategetMonth() (it starts with 0 January, so you probably want 1), and DategetDate() (day of month). Possible Duplicate: Extending JavaScripts Date.parse to allow for DD/MM/ YYYY (non-US formatted dates)?To fix this, you need either to parse the input yourself (e.g. with String.split) and then manually construct a Date object, or use a more full-featured library such as datejs.