How to change datepicker stuff

Discussion in 'jQuery' started by Chez Rosbif, Jun 11, 2019.

  1. #1
    I am trying to use this
    http://api.jqueryui.com/datepicker/#option-buttonText
    and cannot understand HOW to make the following changes?

    make the color go to something I want; default is red

    how to make the minimum date work
    Documentation says:
    // Setter
    $( ".selector" ).datepicker( "option", "minDate", new Date(2007, 1 - 1, 1) );

    where docs state:
    • Date: A date object containing the minimum date.
    • Number: A number of days from today. For example 2 represents two days from today and -1 represents yesterday.
    • String: A string in the format defined by the dateFormat option, or a relative date. Relative dates must contain value and period pairs; valid periods are "y" for years, "m" for months, "w" for weeks, and "d"for days. For example, "+1m +7d" represents one month and seven days from today.
    Say what?????????? :)
    If I want the date to start at today, what do I do?
     
    Chez Rosbif, Jun 11, 2019 IP
  2. Chez Rosbif

    Chez Rosbif Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #2
    Thanks for your help. Not :) I coded my own.
     
    Chez Rosbif, Jun 12, 2019 IP
  3. vijaymee05

    vijaymee05 Member

    Messages:
    24
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    38
    #3
    Set minDate to 0, datepicker will start from today.
    Like:
    $( "#datepicker" ).datepicker({
    minDate: 0
    });
    And if you want to change the color then you have to manage through the style.
    Like:
    .ui-datepicker {
    background: #FF0000;
    border: 1px solid #555;
    color: #FFF;
    }
    Hope it will help you :)
     
    vijaymee05, Jun 26, 2019 IP