<script>$("#pseudo_review_time' goods_id '"). datepicker({dateFormat: "yy-mm-dd"});$("#pseudo_review_time' goods_id '").change(function(){var thetime=$(this).val();var d=new Date( Date.parse(thetime.replace(/-/g,"/")));var curDate=new Date();if(d >curDate){alert("Please select a time less than today!");$ (this).val("");$(this).focus();}});</script>
When I use it, jQuery UI is very powerful, and the date in it Choose the plug-in Datepicker to use with it, it is very useful.