簡體   English   中英

AjaxControlToolkit相對於彈出圖像而不是文本框的日歷位置

[英]AjaxControlToolkit Calendar postioning relative to popup image and not the textbox

嗨,我正在使用AjaxControlToolkit Calander控件。 但根據我的要求,我必須將所選日期拆分為單獨的日期月份和年份的文本框。 所以我使用了一個文本框說“textbox1”,它有一個用於ajax控件calander的popupimage按鈕。

我使用css隱藏textBox1並將autopostback設置為true。 在文本更改事件中,我將日期字符串拆分並根據需要將其放在單獨的文本框中。

除了Calander控制器的定位外,一切正常。 當我隱藏主文本框控件時,壓縮器將自己定位在屏幕的左上方而不是靠近popimage。 我該如何解決這個問題。

如果您嘗試在隱藏的TextBox上附加日歷控件,它肯定會有異常行為。 而不是隱藏文本框,使其看起來像隱藏但不是字面隱藏。 例如

<asp:TextBox ID="textBox1" runat="server" style="border:0 none Transparent;margin:0;width:0;background-color:Transparent" ReadOnly="true" />

由於上面的答案,只需稍作修改即可使其成為正確的答案。

<asp:TextBox ID="textBox1" runat="server" style="border:0 none       Transparent;margin:0;width:0;background-color:Transparent"  /> 

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM