PDA

View Full Version : Newbie Question: Date Field usage



sanjshah
15 Dec 2007, 6:41 PM
Hi,

I'm trying to understand the basics, I have a dateField, how can I add code to prevent certain dates from being selected, i.e. cannot select any dates previous to today and only start selecting from 4 days ahead - can anyone please help?


<script type="text/javascript">

Ext.onReady(function(){

var datetext = new Ext.form.DateField({
emptyText:'Select a Date...',
width:190,
xtype: 'datepicker',
applyTo: 'mydate'
})

});
</script>

Thanks!

santosh.rajan
16 Dec 2007, 12:10 AM
You can set a minValue for the date. Please read doc on datefield.

sanjshah
16 Dec 2007, 5:22 AM
Santosh, thanks for your reply, I've looked in the API docs but there are no examples - where could I find some examples of the options and how to use them?

Thanks,

Sanj

pomata
13 Jan 2008, 5:49 PM
is there a way of setting the selected value for the date picker? (change default date from today to a different one??)

Thanks

P