How to change output format of material 2 date-picker

后端 未结 8 1427
無奈伤痛
無奈伤痛 2020-12-16 05:41

I am using angular material 2 Date-Picker component

The only string input it understands is in ISO date format

Ex. \"2017-11-13T10:39:28.300Z\"

But i

8条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-16 06:10

    you can change it's format like this:

     const Date = Date.replace(/-/g, '/')
    

提交回复
热议问题