views:

93

answers:

2

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 get the new selected date without postback.

Can you help please?

Thank you in advance.

A: 

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

Pandiya Chendur
+1  A: 

Jquery DatePicker is really good.

Madi D.