<输入类型=“日期” >页面上看起来有所不同(WebView)

发布于 2025-02-10 07:32:10 字数 1117 浏览 1 评论 0原文

在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>

enter image description here

Solution:Problem solved using jquery-ui-date-picker, thanks everyone.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

躲猫猫 2025-02-17 07:32:10

日期/时间输入是标准输入,可以根据浏览器具有不同的设计。您可能会认为它在每个不同的浏览器中看起来都不同。

例如:

您也可以编写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:
enter image description here

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文