Results 1 to 3 of 3

Thread: Jquery Date Picker

  1. #1
    Join Date
    Jul 2010
    Posts
    228
    Thanks
    18
    Thanked 0 Times in 0 Posts

    Default Jquery Date Picker

    Good day!

    I explore something so I used jquery in my date, without any knowledge about jquery. I research a sample Jquery Date Picker internet and I found one, my problem is the Year is started at 2001 , I don't know if I could change it so that the year would start atleast 1950's or 1990's

    here's the code that I add in my webpage to display the Jquery Date Picker
    Code:
    <link rel="stylesheet" href="ui.all.css" type="text/css" media="screen" />
    
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>
    
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.5.3/jquery-ui.min.js"></script>
    
    <script type="text/javascript">
    
    $(document).ready(function(){
    
    $("#date").datepicker({ showOn: 'button', buttonText: "Select your Birthday" });
    
    });
    
    </script>

    I will attach the date picker that I get from internet.

    Thank you
    Last edited by rhodarose; 05-09-2011 at 07:29 AM.

  2. #2
    Join Date
    Feb 2008
    Posts
    81
    Thanks
    8
    Thanked 5 Times in 5 Posts

    Default

    Just use the yearRange property {1950:2014}, or something like that:

    Code:
    <script type="text/javascript">
    
    $(document).ready(function(){
    
    $("#date").datepicker({ showOn: 'button', buttonText: "Select your Birthday", yearRange: '1950:2014' });
    
    });
    
    </script>
    Jquery UI has a detailed documentation, so you better check this: http://docs.jquery.com/UI/Datepicker#option-yearRange

  3. #3
    Join Date
    Jul 2010
    Posts
    228
    Thanks
    18
    Thanked 0 Times in 0 Posts

    Default

    Thank you..it works

Bookmarks

Posting Permissions

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