开发者

asp.net Date picker

开发者 https://www.devze.com 2022-12-15 13:19 出处:网络
I\'ve searched for a free and good Date picker out there but I didn\'t found one that will be good for me.

I've searched for a free and good Date picker out there but I didn't found one that will be good for me.

I've created one on my own.

I've added a Calendar to the aspx page, and on PageLoad set it's attribute:

calReqToDate.Style.Add("display", "none");

I've created a "Show" button and set it's attribute on PageLoad too:

btnCalReqToDate.Attributes.Add("onclick", "HideShow();return false;");

Now all I have to do is to change the date label when the user selects a day. I've tries to do so by catching the "onclick" event of the calendar and getting the selected date, and the return False so the page will no post back:

In the PageLoad event: calReqToDate.Style.Add("onclick", "DateSelect();return false;");

In the aspx page: document.getElementById('<%= lblReqToDate.ClientID %>').innerHTML = '<%= calReqToDate.SelectedDate %>';

The problem is that the selected date does not changed without the postback, so the label gets the old date.

I need to find a way to g开发者_运维问答et the new selected date without postback.

Can you help please?

Thank you in advance.


Jquery DatePicker is really good.


Hai roy,

If dont want to postback,

try Jquery and javascript date pickers

http://www.bitrepository.com/a-collection-of-free-javascript-date-pickers.html

or

AJAX Date picker

http://www.codeproject.com/KB/ajax/AJAXDatePicker.aspx

0

精彩评论

暂无评论...
验证码 换一张
取 消