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 6728025
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:07:12+00:00 2026-05-26T10:07:12+00:00

I most likely suspect is not possible but I wanted to know If someone

  • 0

I most likely suspect is not possible but I wanted to know If someone was has worked with customizing the calendar displayed on Jquery UI datepicker to the extend of changing the dates.
Here is my situation: My company uses a fiscal year instead of a calendar year where and it begins on a different day each year, I actually made an excel calendar in the mean time and I could use the principle on javascript, my question is if there is a way to set up an initial date on the calendar and start counting weeks from that day…

Example

Fiscal year starts on August 28 (sunday), given that :
AUG28-SEPT3 = FW1
SEPT4-SEPT10 = FW2
SEPT11-SEPT17 = FW3
.
.
.
and so on …
i want to show a calendar with the week number starting on AUG28 2011 (fw1) and ending on aug25 2012 (fw52).

i already read the documentation and I cant’ find anything related, if I was not clear enough please let me know so I can rephrase.

  • 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-05-26T10:07:13+00:00Added an answer on May 26, 2026 at 10:07 am

    You will have to create your own week calculation, see the docs for jQuery UI calculateWeek. Its a start, but not too helpful in those doc’s. A little more useful was this blog post here.

    Anyway here is the code I have managed to hack together, see the link below to see it working.

  2. Define the datapicker:
  3. $("#mydatepicker").datepicker({
        calculateWeek: fisc,
        maxDate: '08/25/12',
        minDate: '08/28/11',
        showWeek: true
    });
    
  4. And the function to calculate the weeks:
  5. function fisc(date) {
        var checkDate = new Date(date.getTime());
        checkDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7));
        var time = checkDate.getTime();
        checkDate.setMonth(7); 
        checkDate.setDate(28);
        var week = (Math.floor(Math.round((time - checkDate) / 86400000) / 7) + 2);
        if (week < 1) {
            week = 52 + week;
        }
        return 'FW: '+week;
    }
    

    Click here to see this in action

    I’m sure this probably isn’t the perfect way to do this, but it seems to work for this time of night, hopefully it will point you in the correct direction.

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

Sidebar

Related Questions

This is most likely not possible, but I'm just asking this to check... I'm
This is most likely not an easy one but here is the situation: I
I know this is most-likely a simple question but when you restore a database
So at this moment (but most likely not for long) Reddit, Meetup, Fark, LinkedIn,
I know $_SERVER['DOCUMENT_ROOT'] returns the document root (most likely something like /home/user/public_html), but is
This is most likely possible, but I want to style the main page using
I understand the answer to this is most likely No... but I wanted to
This is most likely a very obvious answer, but I am just not seeing
As you most likely already know, it's simple in JQuery to select all elements
My question is simple (although the answer will most likely not be): I'm trying

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.