Results 1 to 4 of 4

Thread: Newbie Question: Date Field usage

  1. #1
    Ext JS Premium Member
    Join Date
    Dec 2007
    Posts
    213

    Default Newbie Question: Date Field usage

    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?

    Code:
    <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!

  2. #2
    Ext User santosh.rajan's Avatar
    Join Date
    Sep 2007
    Location
    Kannur, Kerala, India
    Posts
    611

    Default

    You can set a minValue for the date. Please read doc on datefield.
    Make everything as simple as possible, but not simpler.
    - Albert Einstein

  3. #3
    Ext JS Premium Member
    Join Date
    Dec 2007
    Posts
    213

    Default

    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

  4. #4
    Ext User
    Join Date
    Mar 2007
    Posts
    108

    Default

    is there a way of setting the selected value for the date picker? (change default date from today to a different one??)

    Thanks

    P

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •