【程序员博客0001】解决html5 下input type为date,设置value值无效的问题

in php •  5 years ago 

html5下input有个新类型 date,用来设置日期的,效果如下:

当你为input 设置value值的时候,不生效,比如设置2019-12-04,效果如下:

但是可以用js的办法来搞定:

最终效果:

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Congratulations @kevinwang2019! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You got your First payout

You can view your badges on your Steem Board and compare to others on the Steem Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

Vote for @Steemitboard as a witness to get one more award and increased upvotes!