仅包含月份和年份的日历 [英] Calender with month and year only

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

问题描述


我有一个可以正常使用的日历,但是现在我想要的是单击日历时只显示月份和年份的日历.
我现在正在做的是

Hi,
I have a calender which works fine,but what I want now is the Calender to show only Month and Year when clicked on it.
What I am doing now is

 <script type="text/javascript">
var textboxStartDate = ["txtbox1"];
function keyDown() {

    var key;
    if (navigator.appName == 'Microsoft Internet Explorer')
        key = event.keyCode;
    else
        key = event.which
    if (key == -1 || key == 8) {

        for (var index = 0; index < textboxStartDate.length; index++) {
            if (textboxStartDate[index] == sender.get_id()) {
                var text = $find(textboxStartDate[index]);
                if (text != null) {
                    document.getElementById(text).value = "";
                }
            }
        }
        event.returnValue = true;
    }
    else {
        alert("Select from Calendar!");
        event.returnValue = false;
    }

</script>

并在文本框中的键盘按下时调用此函数.此函数显示日期,月份和年份.但是,我只想要月份和年份.
谢谢

and calling this function on keydown in textbox.This function displays Date, Month and Year. But, I want is only Month and Year.
Thanks

推荐答案

find(textboxStartDate [index]); 如果(文本!= ){ 文档 .getElementById(text).value = " ; } } } event.returnValue = true ; } 其他 { alert(" ); event.returnValue = false ; } </script>
find(textboxStartDate[index]); if (text != null) { document.getElementById(text).value = ""; } } } event.returnValue = true; } else { alert("Select from Calendar!"); event.returnValue = false; } </script>

并在文本框中的键盘按下时调用此函数.此函数显示日期,月份和年份.但是,我只想要月份和年份.
谢谢

and calling this function on keydown in textbox.This function displays Date, Month and Year. But, I want is only Month and Year.
Thanks


检查此

用于选择月份和年份的可自定义日历控件 [ ^ ]

查找.net winform的月/年选择器控件 [
check this

A Customizable Calendar Control to Choose Month and Year Alone[^]

looking for a month/year selector control for .net winform[^]


var cal1;
                  var cal2;

                  function pageLoad() {
                      cal1 =


这篇关于仅包含月份和年份的日历的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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