1. #1
    Ext User
    Join Date
    Mar 2007
    Posts
    176
    Vote Rating
    0
    zquirm is on a distinguished road

      0  

    Default Date Picker

    Date Picker


    I'd like to use your date picker b/c it seems much more lightweight than YUI's calendar. Can you use that outside of the Grid? If so, how?

    thanks.

  2. #2
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    Tampa, FL
    Posts
    6,955
    Vote Rating
    16
    jack.slocum will become famous soon enough

      0  

    Default


    There are no examples of using it outside of the grid yet. When the forms stuff is finished there will be some examples of using it.

  3. #3
    Ext User
    Join Date
    Mar 2007
    Posts
    108
    Vote Rating
    0
    pomata is on a distinguished road

      0  

    Default


    Any Idea when this is going to happen?

    ta

    Pomata

  4. #4
    Ext User
    Join Date
    Apr 2007
    Posts
    5
    Vote Rating
    0
    ciduarte is on a distinguished road

      0  

    Default


    I have already used it outside of a form/grid like this...

    datePicker = new Ext.DatePicker();
    datePicker.render(Ext.get('calendar'));

  5. #5
    Ext User alanwilliamson's Avatar
    Join Date
    Mar 2007
    Location
    Scotland
    Posts
    61
    Vote Rating
    0
    alanwilliamson is on a distinguished road

      0  

    Default


    I got this far also, but i am finding it difficult to find a 'clean' way to have the DatePicker popup above the current elements.

    I suspect i need to create a layer dynamically, and then place it inside that particular layer.

    Would that be correct?

  6. #6
    Ext User alanwilliamson's Avatar
    Join Date
    Mar 2007
    Location
    Scotland
    Posts
    61
    Vote Rating
    0
    alanwilliamson is on a distinguished road

      0  

    Default


    Here is what i hacked together for this:

    Code:
    <div id="datepicker" style="z-index: 9999; position:absolute;"></div>
    
    // calls this function logic:
    
    var divTag = Ext.get('datepicker');
    var anchor = Ext.get( 'anchorDiv' );
    			
    divTag.setX( anchor.getX() );
    divTag.setY( anchor.getY() );
    			
    datepicker.render( divTag );
    datepicker.show();
    This pops up the date picker and allows us to now display near the form in question.

  7. #7
    Ext User alanwilliamson's Avatar
    Join Date
    Mar 2007
    Location
    Scotland
    Posts
    61
    Vote Rating
    0
    alanwilliamson is on a distinguished road

      0  

    Default


    Okay now my next problem is closing/cancelling the DatePicker; how can i do this cleanly?

    The user has to click a date to close it down, otherwise it stays up forever!

    Thoughts?

  8. #8
    Ext User
    Join Date
    Sep 2007
    Posts
    29
    Vote Rating
    0
    august is on a distinguished road

      0  

    Default


    Quote Originally Posted by alanwilliamson View Post
    Okay now my next problem is closing/cancelling the DatePicker; how can i do this cleanly?

    The user has to click a date to close it down, otherwise it stays up forever!

    Thoughts?
    Anyone answer this question?i also want to use datepicker with my own button and anyone can show me the way? thanks in advance!

  9. #9
    Ext User
    Join Date
    Feb 2008
    Posts
    5
    Vote Rating
    0
    abbasali is on a distinguished road

      0  

    Default


    Sorry to bump this thread. I am also facing the same issue of datepicker staying up forever and need a solution to close it down either with a button (on picker itself) or when the user clicks away.

  10. #10
    Ext User zurik44's Avatar
    Join Date
    Apr 2007
    Posts
    16
    Vote Rating
    0
    zurik44 is on a distinguished road

      0  

    Default I did it like this.. but it's not the best solution i'm assuming.

    I did it like this.. but it's not the best solution i'm assuming.


    Code:
    var datepickeractive = 0;
    function selectDate(){
    	var datepicker = new Ext.DatePicker();
    	if(datepickeractive == 0){
    		datepicker.render('dateholder');
    		datepickeractive=1;
    	} else {
    		Ext.get('dateholder').dom.innerHTML='';		
    		datepickeractive=0;
    	}
    }

Similar Threads

  1. Time Picker Combobox?
    By San in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 27 Feb 2007, 2:06 PM
  2. DateEditor date picker and disabledDates
    By jamaljohnson in forum Ext 1.x: Help & Discussion
    Replies: 0
    Last Post: 25 Jan 2007, 6:45 PM
  3. date picker
    By pomata in forum Ext 1.x: Help & Discussion
    Replies: 0
    Last Post: 10 Dec 2006, 12:11 PM
  4. Color picker editor for yui-ext
    By rodiniz in forum Community Discussion
    Replies: 10
    Last Post: 25 Nov 2006, 8:22 PM
  5. Remove Day of the Week from Date Picker
    By dmayer in forum Ext 1.x: Help & Discussion
    Replies: 8
    Last Post: 5 Oct 2006, 1:42 PM

Thread Participants: 8