在Ajax numericUpDown控件上显示变化的小时-分钟 [英] Showing-changing hour-minutes on the Ajax numericUpDown control

查看:57
本文介绍了在Ajax numericUpDown控件上显示变化的小时-分钟的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我在ASP.NET网页中构造了Ajax控件工具包numericUpDown.我设置了Minimum = 00和Maximum = 24.有用.我想在此numericUpDown中更改小时和分钟.像14:30..etc之类的东西当我尝试编写MAximum = 23:59和Minimum = 00:00程序时,不接受此表示法.如何在numericUpDown上显示小时-分钟,并通过按钮进行更改?

Hi all,
I have constructed Ajax Control Toolkit numericUpDown in my ASP.NET web page.I set the Minimum=00 and Maximum=24. It works. I want to change Hour and minutes in this numericUpDown. Something like 14:30..etc. When I try to write MAximum=23:59 and Minimum=00:00 program not accept this notation. How can I show hour-minutes on the numericUpDown and change it by using buttons?

<asp:TextBox ID="TextBox4" runat="server" Width="79px">00:00</asp:TextBox>
                                  <asp:NumericUpDownExtender Width="60" TargetControlID="TextBox4"  Minimum="00"

                                      Maximum="23" ID="NumericUpDownExtender1" runat="server">
                                  </asp:NumericUpDownExtender>



谢谢.



Thanks.

推荐答案

您正试图将NUMERIC属性的值设置为23:59,而不是数字.当然,控件将不会接受这一点.

您必须自己编写此功能的代码,否则numericUpDown控件将无济于事.使用JavaScript处理按钮的事件并在文本框中正确设置文本格式非常容易.
You are attempting to set a value for a NUMERIC property to 23:59, which is NOT numeric. Of course the control will not accept this.

You must code this functionality yourself, the numericUpDown control won''t help you. It is very easy to handle the events for the buttons and format the text in your textbox appropriately using JavaScript


您是对的,我不应该使用23:59表示法.如何从Google查找用于搜索JavaScript代码的代码?我应该为Google写哪些词?
You are right, I should not use 23:59 notation. How can I find from google for searching javascript code? Which words I should write google?


这篇关于在Ajax numericUpDown控件上显示变化的小时-分钟的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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