简体   繁体   English

如何同时使用JQuery datepicker和timepicker

[英]How to use JQuery datepicker and timepicker together

I want to implement JQuery Datepicker and Time picker together. 我想一起实现JQuery Datepicker和时间选择器。 I downloaded the plugin. 我下载了插件。 And I use this JS to configure it: 我使用此JS对其进行配置:

<script type="text/javascript" src="resources/js/timepicker-addon.js"></script>
....
                       <script type="text/javascript">
                            //For calendar
                            $(".datepicker").datepicker({
                                inline: true,
                                showWeek: true,
                                firstDay: 1,
                                dateFormat: 'dd-MM-yy',
                                timeFormat: 'h:m',
                            separator: ' @ '
                            });                            
                        </script>

But when I open the JSF page I see simple calendar. 但是,当我打开JSF页面时,会看到简单的日历。 Can you help me to implement the timepicker? 您能帮我实现时间选择器吗?

You can use what this article recommends: http://trentrichardson.com/examples/timepicker/ 您可以使用本文的建议: http : //trentrichardson.com/examples/timepicker/

After using it, the following will be what you will see: 使用它之后,将显示以下内容:

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM