Javascript 如何使jquery日历不从系统中拾取当前日期

Javascript 如何使jquery日历不从系统中拾取当前日期,javascript,jquery,Javascript,Jquery,我在系统上设置了错误的系统日期,Jquery日历正在选择当前日期作为系统的当前日期。。如何从Internet显示当前日期 。任何人都可以解决此问题吗?请尝试此代码,希望它对您有所帮助。谢谢 html: <input type="text" id="stDate"/> $(function(){ $("#stDate").datepicker({ dateFormat: 'mm/dd/yy', changeMonth

我在系统上设置了错误的系统日期,Jquery日历正在选择当前日期作为系统的当前日期。。如何从Internet显示当前日期
。任何人都可以解决此问题吗?

请尝试此代码,希望它对您有所帮助。谢谢

html:

<input type="text" id="stDate"/>
$(function(){
$("#stDate").datepicker({ dateFormat: 'mm/dd/yy', 
                                 changeMonth: true,
                                 changeYear: true,
                                 yearRange: '-70:+10',
                                 constrainInput: false,
                                 duration: '',
                                 gotoCurrent: true}).datepicker('setDate',"0");
});
<!DOCTYPE html>
<html>
  <head>
     <title>
    Date Time Now
     </title>
     <meta charset="utf-8" />
    <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
    <script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script>
    <link rel="stylesheet" type="text/css" href="http://code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css">
    <script type="text/javascript">
    $(function(){
        $("#stDate").datepicker({ dateFormat: 'mm/dd/yy', 
                                 changeMonth: true,
                                 changeYear: true,
                                 yearRange: '-70:+10',
                                 constrainInput: false,
                                 duration: '',
                                 gotoCurrent: true}).datepicker('setDate',"0");
    });
    </script>
    </head>
    <body>
        <input type="text" id="stDate"/>            
    </body>
</html>
示例HTML页面:

<input type="text" id="stDate"/>
$(function(){
$("#stDate").datepicker({ dateFormat: 'mm/dd/yy', 
                                 changeMonth: true,
                                 changeYear: true,
                                 yearRange: '-70:+10',
                                 constrainInput: false,
                                 duration: '',
                                 gotoCurrent: true}).datepicker('setDate',"0");
});
<!DOCTYPE html>
<html>
  <head>
     <title>
    Date Time Now
     </title>
     <meta charset="utf-8" />
    <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
    <script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script>
    <link rel="stylesheet" type="text/css" href="http://code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css">
    <script type="text/javascript">
    $(function(){
        $("#stDate").datepicker({ dateFormat: 'mm/dd/yy', 
                                 changeMonth: true,
                                 changeYear: true,
                                 yearRange: '-70:+10',
                                 constrainInput: false,
                                 duration: '',
                                 gotoCurrent: true}).datepicker('setDate',"0");
    });
    </script>
    </head>
    <body>
        <input type="text" id="stDate"/>            
    </body>
</html>

现在日期时间
$(函数(){
$(“#stDate”).datepicker({dateFormat:'mm/dd/yy',
变化月:对,
变化年:是的,
年份范围:'-70:+10',
输入:false,
持续时间:“”,
gotoCurrent:true}).datepicker('setDate',0');
});

看到这一点,在您的机器上输入正确的日期比寻找解决方法更合适。我可以在我的系统中设置,但我正在开发应用程序,用户可能不会设置date@dandamoodi,请查找我的最新更新。我为您添加了示例HTML页面。希望对你有帮助。请再次检查并让我知道。Thanks@dandamoodi,您是否尝试过示例HTML页面。请再次检查并让我知道。谢谢