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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T15:44:18+00:00 2026-06-14T15:44:18+00:00

How to fix this calendar? i really confused to make back button and make

  • 0

How to fix this calendar? i really confused to make back button and make calendar form reference, i must change ‘RsT’ number per month to equate start day in a month?

Note :
– RsT: calendar start position number.
– mt: number of month.
– dy: day of today
– maxDate: End date of month.
– newMth() function: build calendar.
– onBtnPress(i) function: Button response.
– aD: (1st date – 1), actually = 0.
– CnT/CtX: For count.
– it[]: Element id.
– mm[]: Month name.

<HTML><HEAD>
<TITLE>Kalender Digital</TITLE>
<HTA:APPLICATION
APPLICATIONNAME="Calendar"
VERSION="1.0.2.1"
BORDER="THICK"
INNERBORDER="NO"
MAXIMIZEBUTTON="NO"
SCROLL="NO"
SINGLEINSTANCE="YES"
CONTEXTMENU="NO"
SELECTION="NO"/>
<STYLE TYPE='TEXT/CSS'>
TABLE{width:702px;height:350px;}
TD{font-family:arial;font-weight:bold;width:100px;height:50px;font-size:12pt;}
.header{font-family:arial;font-weight:bold;height:50px;font-size:26pt;color:orange;}
TD.dy{color:blue;}
TD.jm{color:green;}
TD.mg{color:red;}
BUTTON{width:100%;height:100%;cursor:pointer;}
</STYLE><META HTTP-EQUIV='MSThemeCompatible' CONTENT='YES'></HEAD>
<BODY TOPMARGIN='0' LEFTMARGIN='0'>
<TABLE BGCOLOR='#FFFFFF' BORDER='1' BORDERCOLOR='#000000' CELLSPACING='0px' CELLPADDING='0px' TABINDEX='0'>
<TR ALIGN='CENTER'><TD CLASS='header' COLSPAN='4' ID='dtl' STYLE='WIDTH:400px'></TD><TD COLSPAN='1'><BUTTON LANGUAGE='JavaScript' ONCLICK='onBtnPress(1)'>&lt;&lt;</BUTTON></TD><TD COLSPAN='1'><BUTTON>Today</BUTTON></TD><TD COLSPAN='1'><BUTTON LANGUAGE='JavaScript' ONCLICK='onBtnPress(0)'>&gt;&gt;</BUTTON></TD></TR>
<TR ALIGN='CENTER'><TD CLASS='dy'>Monday</TD><TD CLASS='dy'>Tuesday</TD><TD CLASS='dy'>Wednesday</TD><TD CLASS='dy'>Thursday</TD><TD CLASS='jm'>Friday</TD><TD CLASS='dy'>Saturday</TD><TD CLASS='mg'>Sunday</TD></TR>
<TR ALIGN='CENTER'><TD ID='aa' CLASS='dy'>-</TD><TD ID='ab' CLASS='dy'>-</TD><TD ID='ac' CLASS='dy'>-</TD><TD ID='ad' CLASS='dy'>-</TD><TD ID='ae' CLASS='jm'>-</TD><TD ID='af' CLASS='dy'>-</TD><TD ID='ag' CLASS='mg'>-</TD></TR>
<TR ALIGN='CENTER'><TD ID='ba' CLASS='dy'>-</TD><TD ID='bb' CLASS='dy'>-</TD><TD ID='bc' CLASS='dy'>-</TD><TD ID='bd' CLASS='dy'>-</TD><TD ID='be' CLASS='jm'>-</TD><TD ID='bf' CLASS='dy'>-</TD><TD ID='bg' CLASS='mg'>-</TD></TR>
<TR ALIGN='CENTER'><TD ID='ca' CLASS='dy'>-</TD><TD ID='cb' CLASS='dy'>-</TD><TD ID='cc' CLASS='dy'>-</TD><TD ID='cd' CLASS='dy'>-</TD><TD ID='ce' CLASS='jm'>-</TD><TD ID='cf' CLASS='dy'>-</TD><TD ID='cg' CLASS='mg'>-</TD></TR>
<TR ALIGN='CENTER'><TD ID='da' CLASS='dy'>-</TD><TD ID='db' CLASS='dy'>-</TD><TD ID='dc' CLASS='dy'>-</TD><TD ID='dd' CLASS='dy'>-</TD><TD ID='de' CLASS='jm'>-</TD><TD ID='df' CLASS='dy'>-</TD><TD ID='dg' CLASS='mg'>-</TD></TR>
<TR ALIGN='CENTER'><TD ID='ea' CLASS='dy'>-</TD><TD ID='eb' CLASS='dy'>-</TD><TD ID='ec' CLASS='dy'>-</TD><TD ID='ed' CLASS='dy'>-</TD><TD ID='ee' CLASS='jm'>-</TD><TD ID='ef' CLASS='dy'>-</TD><TD ID='eg' CLASS='mg'>-</TD></TR>
<TR ALIGN='CENTER'><TD ID='fa' CLASS='dy'>-</TD><TD ID='fb' CLASS='dy'>-</TD><TD ID='fc' CLASS='dy'>-</TD><TD ID='fd' CLASS='dy'>-</TD><TD ID='fe' CLASS='jm'>-</TD><TD ID='ff' CLASS='dy'>-</TD><TD ID='fg' CLASS='mg'>-</TD></TR>
</TABLE></BODY>
<SCRIPT LANGUAGE='JavaScript'>
dt = new Date()
it = ["aa", "ab", "ac", "ad", "ae", "af", "ag", "ba", "bb", "bc", "bd", "be", "bf", "bg", "ca", "cb", "cc", "cd", "ce", "cf", "cg", "da", "db", "dc", "dd", "de", "df", "dg", "ea", "eb", "ec", "ed", "ee", "ef", "eg", "fa", "fb", "fc", "fd", "fe", "ff", "fg"];
mm = ["January", "February", "March", "April", "May", "June", "July", "Agust", "September", "October", "November", "December"];
var mt = dt.getMonth();
var yr = dt.getFullYear();
dtl.innerHTML = mm[mt] + "&nbsp;&nbsp;" + yr
var RsT = 2;
var CnT = 0;
var aD = 0;
newMth();
function newMth () {
    var d2 = new Date(yr, (mt + 1), aD);
    maxDate = d2.getDate()
    while (CnT < maxDate) {
    aD = (aD + 1);
    RsT = (RsT+1)
    document.getElementById(it[RsT]).innerHTML = aD;
    CnT = (CnT + 1)};
}
function onBtnPress (i) {
    CnT = 0;
    aD = 0;
    CtX = 0;
    if (i == 0) {
    RsC = 28;
    while (document.getElementById(it[RsC]).innerHTML != "-" & RsC <= 41) {
        RsC = (RsC+1);
    }
    if (RsC < 35) {
        RsC = (RsC - 28)
    } else {
        RsC=(RsC-35)
    }
    RsT = (6 - (7 - RsC));
    if (mt <= 10) {
        mt = (mt + 1)
    } else {
        mt=0;yr=(yr+1);
    }
    } else if (i==1) {
        if (mt > 0) {
            mt = (mt - 1)
        } else {
            mt = 11;
            yr = (yr - 1);
        }
    }
    while (CtX < 41) {
        document.getElementById(it[CtX]).innerHTML = "-";
        CtX = (CtX + 1);
    }
    newMth();
    dtl.innerHTML = mm[mt] + "&nbsp;" + yr
}
</SCRIPT>
</HTML>
  • 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-14T15:44:19+00:00Added an answer on June 14, 2026 at 3:44 pm

    The first day of the month is:

    new Date('date_of_1st_day_of_some_month_in_some_year').getDay();
    

    This returns a dayname index (sunday == 0, monday == 1,…). With this information it should be easy to loop over “empty” days at the beginning of the month.

    FYI, you can add HTML5 support for your HTA by adding <!DOCTYPE html> as the very first line in the document, and then add <meta http-equiv="x-ua-compatible" content="ie=9" /> immediately after title. All stylesheets and links to them should be after this meta.

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

Sidebar

Related Questions

This should be a simple fix; I currently have a calendar for selecting a
I can't fix this problem on my listview template: i have the error as
How to fix this error? @echo off Setlocal EnableDelayedExpansion REM LINES FOR TEST: REM
How do I fix this so that when php calls $fontcolor and the user
Any ideas how to fix this? UserService.UserServiceClient userServiceClient = new UserServiceClient(); userServiceClient.GetUsersCompleted += new
How do i fix this link in javascript. <a href=javascript:clientGalleryLink(Business)>Link</a> Its missing single quotes
How can I fix this? REGEX: //REGEX $match_expression = '/Rt..tt<\/td> <td>(.*)<\/td>/'; preg_match($match_expression,$text,$matches1); $final =
How do I fix this error? error C2668: 'std::_Tree<_Traits>::end' : ambiguous call to overloaded
How would you fix this code? template <typename T> void closed_range(T begin, T end)
How can I fix this error, and install thin or other gems? $ sudo

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.