Using moment.js to convert date to string “MM/dd/yyyy”

后端 未结 6 1675
有刺的猬
有刺的猬 2021-01-31 06:55

I need to take the date value from jquery datepicker turn it into string format \"MM/dd/yyyy\" so it can do the right ajax post. When the page loads or upon changing the datepic

6条回答
  •  悲&欢浪女
    2021-01-31 07:15

    I think you just have incorrect casing in the format string. According to the documentation this should work for you: MM/DD/YYYY

    moment.js documentation

提交回复
热议问题