如何在下拉列表中添加日历控件 [英] How do I add calender control in dropdownlist

查看:504
本文介绍了如何在下拉列表中添加日历控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在下拉列表中添加日历控件,当我单击下拉列表时,calendercontrol将出现在下拉列表中,并且当我从calendercontrol中选择日期时,它将显示在文本框中

How can i add calender control in dropdownlist and when i click dropdownlist calendercontrol will appear in dropdownlist, and when i select the date from calendercontrol it will display on text box

推荐答案

上面的答案看起来像是Windows控件...

对于ASP.NET:
可以说,我们创建了一个可以执行您所要求的用户控件.
放置一个文本框,在其旁边放置一个图像(应该具有下拉菜单的感觉),然后在控件上放置一个日历.

现在,点击文本框/图像:
关联日历控件的可见性(如果需要,还可以切换图像).日历可见后,选择日期,然后选择即可隐藏日历并在文本框中显示所选日期(所有这些操作都可以在客户端完成)

总的来说,这会让您有带日历的下拉菜单.
The answer above looks like for Windows control...

For ASP.NET:
Lets say we create a user control that does what you ask.
Drop a textbox, adjacent to it an image (this should give a feel of a dropdown) and then a calendar on the control.

Now, on click of textbox/image:
tie the visibility of the calendar control (also can toggle the image if needed). Once the calendar is visible, select the date and on selection you can hide back the calendar and show the selected date in the textbox (all this can be done on client side)

This in total would give you a feel of a dropdown having calendar.


1.标题=将压光机控件添加到组合框
2.消息:您尝试了什么
3.阅读
1. Title = Add calender control to combobox
2. Message: what you tried
3. Read this


这篇关于如何在下拉列表中添加日历控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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