Input type DateTime - Value format?

后端 未结 7 814
长发绾君心
长发绾君心 2020-11-27 18:10

In which format should I put the date and time, for use in the HTML5 input element with datetime type?

I have tried:

  • 1338575502
7条回答
  •  夕颜
    夕颜 (楼主)
    2020-11-27 18:27

    This works for setting the value of the INPUT:

    strftime('%Y-%m-%dT%H:%M:%S', time())
    

提交回复
热议问题