<输入类型=“日期” >页面上看起来有所不同(WebView)
在HTML页面中,有一个输入,带有类型=日期如下。但是该日期如下图所示。我希望打开普通日历,这可能是什么原因?我也想记下。当我尝试从任何浏览器打开此日历时,没有问题。我将其用作移动应用程序中的WebView页面,并且问题出现在那里。
<div>
<input type="date" id="end_date" name="end_date">
</div>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="{$TMPL}/css/broadrecord.css" />
</head>
解决方案:使用jquery-ui-date-picker解决的问题,谢谢大家。
In an html page, there is an input with type=date as follows. But this date is shown as the picture below. I want the normal calendar to be opened, what could be the reason? I also want to make a note. When I try to open this calendar from any browser, there is no problem. I use it as a webview page in the mobile application and the problem occurs there.
<div>
<input type="date" id="end_date" name="end_date">
</div>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="{$TMPL}/css/broadrecord.css" />
</head>
Solution:Problem solved using jquery-ui-date-picker, thanks everyone.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
日期/时间输入是标准输入,可以根据浏览器具有不同的设计。您可能会认为它在每个不同的浏览器中看起来都不同。
例如:

您也可以编写CSS并将其样式化,以在每个浏览器中以一种共同的方式编写。
The date/time input is a standard input and can have different designs according to the browser. You might think that it looks different in every different browser.
For example:

You can also write CSS and style it to write this in a common way in every browser.