Does anyone know how to parse date string in required format dd.mm.yyyy
?
相关问题
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- void before promise syntax
- Keeping track of variable instances
- Can php detect if javascript is on or not?
refs: http://momentjs.com/docs/#/parsing/string/
If you use moment.js, you can use "string" + "format" mode
ex:
This function handles also the invalid 29.2.2001 date.
you can format date just making this type of the code.In javascript.
I'v been used following code in IE. (IE8 compatible)
See:
Code:
If you are using jQuery UI, you can format any date with:
http://jsfiddle.net/mescalito2345/ND2Qg/14/