2009年8月25日星期二

RE: [fw-mvc] dijit.form.DateTextBox properties

Thanks ! I did as following  and it worked. My issue was I was give 8 for August but it need 08.

 

constraints="{min:'2009-08-10',max:'2009-12-31',formatLength:'long'}"

 

Naimesh

From: ivar koster [mailto:ivar.koster@gmail.com]
Sent: Monday, August 24, 2009 8:01 PM
To: Naimesh.Trivedi (Gmail)
Subject: Re: [fw-mvc] dijit.form.DateTextBox properties

 

This should work, add:

        dojo.addOnLoad(function() {

            newDate = new Date(2010, 0, 30);
            dijit.byId('task_date').constraints.min = newDate;

        });


Notice that the months for the Date object starts with 0 (zero);



2009/8/24 Naimesh.Trivedi (Gmail) <naimesh.trivedi@gmail.com>

Hello !

I tried giving default value to my dijit.form.DateTextBox and adding min constraints but it does not work. I did give like below :

<input type="text" id="task_date" name="task_date" size="10" value="8/18/2009"
        dojoType="dijit.form.DateTextBox"
        required="true"
        promptMessage="Enter Task date."
        invalidMessage="Invalid date."
        constraints="{min:'8/10/2009'}"
        />

I also tried giving date in yyyy-mm-dd in above both places but still not working. However it pastes date on selection in mm/dd/yyyy format like mentioned above and hence I gave these values.

Can anybody please help me showing where am I wrong or how to do so ?

Thanks in advance !

Naimesh

 

 

 




--
Ivar

没有评论: