Jquery datepicker - 只有日和月 [英] Jquery datepicker - only day and month

查看:19
本文介绍了Jquery datepicker - 只有日和月的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望用户在表单中指定他们的生日或周年纪念日(不含年份).为此,我想使用 jquery datepicker,但它根本不应该显示任何年份选项.怎么做?

I want the user to specify their birthday or anniversary date (without year) in a form. For this, I want to use jquery datepicker but it should not show any year option at all. How to do it?

我尝试修改这个问题中的代码通过使 changeDay: truechangeYear: false 但无法使其工作.

I tried modifying the code in this so question by making changeDay: true and changeYear: false but could not get it to work.

推荐答案

设置css隐藏年份和日期格式,如K6t所说

set the css to hide the year and the dateFormat as K6t said

.ui-datepicker-year{
    display:none;
}

这篇关于Jquery datepicker - 只有日和月的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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