带有简单 Javascript 或 Jquery 的日期选择器

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1963360/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-22 22:08:24  来源:igfitidea点击:

Date Picker with Simple Javascript or Jquery

javascriptjqueryhtmlcss

提问by Thinker

I have a form with multiple date fields, Can anyone suggest me simple date picker in jquery or in simple javascript?

我有一个包含多个日期字段的表单,谁能建议我在 jquery 或简单的 javascript 中使用简单的日期选择器?

回答by Chris

Here's a really simple (no JS frameworks required) one I made, i hope you find it useful. It looks like this: alt text

这是我制作的一个非常简单的(不需要 JS 框架),我希望你觉得它有用。它看起来像这样: 替代文字

And here's the links:

这是链接:

回答by christo issac

You can check with the EJ2 DatePicker from Syncfusion. The Syncfusion Essential JS 2 DatePicker is a modern JavaScript UI Controls library that has been built from the ground up to be lightweight, responsive, modular and touch friendly. Here is the code sample to render the EJ2 DatePicker.

您可以使用 Syncfusion 的 EJ2 DatePicker 进行检查。Syncfusion Essential JS 2 DatePicker 是一个现代 JavaScript UI 控件库,它从头开始构建,具有轻量级、响应性、模块化和触摸友好性。这是呈现 EJ2 DatePicker 的代码示例。

[datepicker.html]

[日期选择器.html]

<html>

<head>
    <script src="https://cdn.syncfusion.com/ej2/dist/ej2.min.js"></script>
    <link href="https://cdn.syncfusion.com/ej2/material.css" rel="stylesheet">
</head>

<body>
    <input id="datepicker" type="text">

    <script>
        var datepicker = new ej.calendars.DatePicker({ width: "255px" });
        datepicker.appendTo('#datepicker');
    </script>
</body>

</html>

Live Demo: https://stackblitz.com/edit/zfby6h-uep3wc?file=index.html

现场演示:https: //stackblitz.com/edit/zfby6h-uep3wc?file=index.html

To explore more about EJ2 DatePicker and its functionalities, check out the following links,

要了解有关 EJ2 DatePicker 及其功能的更多信息,请查看以下链接,

Documentation: https://ej2.syncfusion.com/javascript/documentation/datepicker/es5-getting-started
Feature Tour: https://www.syncfusion.com/javascript-ui-controls/datepicker
Demo Samples: https://ej2.syncfusion.com/demos/#/material/datepicker/default.html

文档:https: //ej2.syncfusion.com/javascript/documentation/datepicker/es5-getting-started
功能导览:https: //www.syncfusion.com/javascript-ui-controls/datepicker
演示示例:https:// ej2.syncfusion.com/demos/#/material/datepicker/default.html

For any assistance, You can ask through Syncfusion forums.

如需任何帮助,您可以通过Syncfusion 论坛提问。

回答by Mahesh Velaga

I used Keith Wood's datepickerwhich is now merged to JQuery UI, and now became JQuery UI Date Picker. Its simple to edit it and I even made some changes to it to make it do what I desired for my project.

我使用了Keith Wood 的日期选择器,它现在已合并到 JQuery UI,现在变成了 JQuery UI 日期选择器。编辑它很简单,我什至对其进行了一些更改,使其能够满足我的项目需求。

Thanks

谢谢

回答by saturngod

I use Jquery UI datepicker. Easy and Colorful. http://jqueryui.com/demos/datepicker

我使用 Jquery UI 日期选择器。简单而多彩。http://jqueryui.com/demos/datepicker

回答by codaddict

I've used thisand found it good.

我用过这个,觉得很好用。