SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Guru whisher's Avatar
    Join Date
    May 2006
    Location
    Kakiland
    Posts
    732
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    jquery datepicker set pickable only a day for week.

    Hi all,
    I'm struggling to find a way
    to enable an user to pick the
    first day of the week (you know the name monday
    just in case ).
    I need to set the datepicker
    with only all the monday highlighted and pickable.
    I'm wondering if there is a way I looking for it
    googling just a lot with no luck.
    So what's to you think about it ?
    Do you know any other way to do that ?
    (The widget goes for a daterange picker for a list of chart)
    best regards ^^
    tut I'm at my wits end

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,705
    Mentioned
    101 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by whisher View Post
    I'm struggling to find a way to enable an user to pick the first day of the week (you know the name monday just in case ).
    You can use the beforeShowDay method. In there, you can check if that day is a monday.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  3. #3
    SitePoint Guru whisher's Avatar
    Join Date
    May 2006
    Location
    Kakiland
    Posts
    732
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks just a lot for the hint

  4. #4
    SitePoint Member
    Join Date
    Dec 2010
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Have a look at "Disable Specific Dates" example in this article 5 jQuery UI Datepicker Examples. The beforeShowDay function allows you to specify a callback which you can use to disable arbitrary dates/day of week/etc.

  5. #5
    SitePoint Guru whisher's Avatar
    Join Date
    May 2006
    Location
    Kakiland
    Posts
    732
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @coder911
    Thanks for the usefull link


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
  •