jQuery UI DateTimepicker-无法隐藏时间 [英] jQuery UI DateTimepicker - cannot hide the time

查看:106
本文介绍了jQuery UI DateTimepicker-无法隐藏时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 http://trentrichardson.com/examples/timepicker/.试图隐藏时间选择器,但我的代码不起作用:

I'm using the date time picker component from http://trentrichardson.com/examples/timepicker/. Trying to hide the time picker but my code doesn't work:

$('#id_start_date_time').datetimepicker('option', 'showTimepicker', false);

推荐答案

我刚刚遇到了这个问题.我知道已经有一段时间了,因为OP提出了这个问题,他可能已经解决了这个问题.仅对于将来可能会遇到此问题的人,如果您想隐藏时间选择器,只需简单地调用原始的jQuery ui datepicker方法

I just came across this issue. I know its been a while since this question was asked by the OP and he has probably solved the problem. Just for someone who might be encountering this issue in the future, if you want to hide the timepicker, just simply call the original jquery ui datepicker method

datepicker()

代替

datetimepicker()

这篇关于jQuery UI DateTimepicker-无法隐藏时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆