Wednesday, March 5, 2008

How to set Min/Max Date to Infragistics WebDateChooser Using Javascript

<igsch:WebDateChooser ID="RevisedDate" runat="server" Value="" Width="105px" Style="z-index: 100; left: 1px; position: relative; top: 0px" MaxDate="2099-12-31" MinDate="1900-01-01" TabIndex="4">
<ClientSideEvents BeforeDropDown="chkMinDate();" />
</igsch:WebDateChooser>

function chkMinDate()
{
var FRMinDate = "1/12/1983";
var today = new Date();
if(FRMinDate != "" && FRMinDate != null)
{
if(FRMinDate.indexOf('/') != -1)
{
var vals = FRMinDate.split('/');
var mn = vals[0];
var d = vals[1];
var yr = vals[2];
today.setFullYear(parseInt(yr),parseInt(mn-1),parseInt(d));
oRevisedDate.setMinDate(today); //for Setting Minimum date
//oRevisedDate.setMaxDate(today); //for Setting Minimum date
//oRevisedDate.setValue(today); //for Setting the date
//oRevisedDate is a Control Name
}
}
}

2 comments:

Anonymous said...

Unquеstionаbly believe thаt which you ѕaid.

Your faѵoгite justification seemed to
be on the nеt the еasiеst thing to be awаre of.
I say tο you, I certаinly gеt irkеd
while peoplе consіder worrieѕ that thеy just ԁοn't know about. You managed to hit the nail upon the top and also defined out the whole thing without having side-effects , people could take a signal. Will probably be back to get more. Thanks
Feel free to visit my site ... http://www.lobstertubehd.com/

Anonymous said...

You ought to be a part оf а conteѕt for one of thе finest blοgs on
the web. I wіll highly reсommend thіs wеb site!
Also visit my web-site ; www.largeporntube.me

 
Feedback Form