Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8458547
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T13:06:35+00:00 2026-06-10T13:06:35+00:00

Is there any jQuery plugin available to select Week / Year for example 1

  • 0

Is there any jQuery plugin available to select Week / Year for example 1 / 2012 or 53 / 2010 just like Date Picker?

I stumbled around but could not find matching plugin. I am thinking of simple selection box but seems picker would give good UX.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T13:06:36+00:00Added an answer on June 10, 2026 at 1:06 pm

    I’ve done that for 1 of my projects restyling jquery UI datepicker. Also getting week number from date is not as simple as it seems: http://brainhog.blogspot.ie/2011/07/get-me-week.html

    Anyways, here’s the complete solution:

    css:

    .ui-datepicker .ui-datepicker-calendar { border-collapse: separate; border-spacing: 0 2px; }
    .ui-datepicker .ui-datepicker-calendar td { padding: 0; border: 1px solid #D3D3D3; border-width: 1px 0; }
    .ui-datepicker .ui-datepicker-calendar td:last-child { border-right-width: 1px; }
    .ui-datepicker .ui-datepicker-calendar td a { border: none; }
    .ui-datepicker .ui-datepicker-calendar tbody tr:hover td { border-color: #FCEFA1; }
    .ui-datepicker-calendar tbody tr:hover td a { background: #FCFAF1; }
    .ui-datepicker-calendar tbody tr:hover .ui-datepicker-week-col,
    .ui-datepicker-calendar tbody tr .ui-datepicker-week-col { background: #757575; padding: 0.2em; color: #fff; text-align: right; border: 1px solid #3F3F3F; }
    #weekPicker { font-size: .7em; }
    

    js:

    $('#weekPicker').datepicker({ 
        firstDay: 1, 
        showWeek: true, 
        weekHeader: '', 
        dateFormat: 'yy-mm-dd',
        beforeShow: function(input, inst){ 
            var yw = input.value.split('-'), dat = getDateFromWeek(yw[0], yw[1]); 
            $('#weekPicker').datepicker("setDate", dat); 
        },
        onClose: function(input, inst){ 
            var yw = new Date(input).getFullWeek(); 
            inst.input.val(yw.y+'-'+yw.w); 
            $('#weekPicker2').html('<b>Week ' + yw.w+'</b>: '+input); 
        }
    });
    

    and you also need these functions:

    //Returns ISO 8601 week number and year
    Date.prototype.getFullWeek = function(){
        var jan1, w, d = new Date(this);
        d.setDate(d.getDate()+4-(d.getDay()||7));   // Set to nearest Thursday: current date + 4 - current day number, make Sunday's day number 7
        jan1 = new Date(d.getFullYear(),0,1);       // Get first day of year
        w = Math.ceil((((d-jan1)/86400000)+1)/7);   // Calculate full weeks to nearest Thursday
        return {y: d.getFullYear(), w: w };
    };
    //Returns ISO 8601 week number
    Date.prototype.getWeek = function(){ return this.getFullWeek().w; };
    var getWeeksInYear = function(y){ return new Date(y,11,28).getFullWeek().w; };
    

    Let me know if you have any issues/questions and whether this works for you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any jQuery plugin for progressive light glow effect like this ?
is there any jQuery plugin to create something like the live feed from the
is there any plugin available as infiview for jquery or any other open source
Is there any JQuery Plugin available for dragging and dropping the Image to Table
Is there any jquery plugin for implementing iGoogle style dashboard? So basically drag n
Is there any plugin for jQuery that would take an argument for the max
is there any JavaScript / jquery library to turn an input into a select
is there any jquery plugin which provides an dropdown-textbox functionality? something similar to http://lab.anotherdan.com/js/textdropdownlist/
I'm looking for this plugin: http://plugins.jquery.com/node/7411 It seems like it's not available for download
Is there any jQuery Plugin to make Bold matched letters in a search query?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.