只显示特定月份在datepicker中的日期 [英] Only display days of specific month in datepicker

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

问题描述

我有一个日期选择器,它显示一个日期。但问题是每月显示上个月的几天,下个月还有几天我不想显示。我想要每个月应该显示那个月份的日子。



例如让我们说月份 JUNE ,这里是几个月的可能以及几个月的日子 JULY 显示,但我希望只显示几天的 JUNE 。我该怎么做?我正在尝试,但没有结果来了。



这是小提琴:



http://jsfiddle.net/cBwEK/

解决方案

您可以通过添加以下方式使其他月份值不可见:

  .datepicker .otherMonth {
能见度:隐藏;
}

到你的CSS。请参阅更新小提琴


I have a date picker and it is displaying a date. But the problem is each month is showing some days of previous month and also some days of next month which I don't want to be displayed. I want that each month should display days of that particular month.

For example let's say Month JUNE, here some days of month MAY and also some days of month JULY are displayed, but i want that only days of JUNE should be displayed. How can I do it? I am trying but no result is coming.

Here is the fiddle:

http://jsfiddle.net/cBwEK/

解决方案

You can make the other month values invisible by adding:

​.datepicker .otherMonth {
    visibility: hidden;        
}

to your CSS. See the updated fiddle.

这篇关于只显示特定月份在datepicker中的日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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