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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T13:23:46+00:00 2026-06-15T13:23:46+00:00

I am trying to trigger a calendar popup on an image with JavaScript, but

  • 0

I am trying to trigger a calendar popup on an image with JavaScript, but for some reason, it isn’t working correctly. Any advice?

Here is my code:

<input size="12" id="f_date1" class="fields"/>&nbsp;<a href="#" class="f_btn1" title="Select your date and time."><img src="Icons/calendar.png" alt="Calendar" width="16" height="16" border="0" /></a></td>

    <script type="text/javascript">//<![CDATA[
      Calendar.setup({
        inputField : "f_date1",
        trigger    : "f_btn1",
        onSelect   : function() { this.hide() },
        showTime   : 12,
        dateFormat : "%Y-%m-%d %I:%M %p"
      });
    //]]></script>

The CSS and the JS are included in the header.


UPDATE

I did that with

<script type="text/javascript">//<![CDATA[
      Calendar.setup({
        inputField : "f_date10",
        trigger    : "f_btn10",
        onSelect   : function() { this.hide() },
        showTime   : 12,
        dateFormat : "%Y-%m-%d %I:%M %p"
      });

      Calendar.setup({
        inputField : "f_date11",
        trigger    : "f_btn11",
        onSelect   : function() { this.hide() },
        showTime   : 12,
        dateFormat : "%Y-%m-%d %I:%M %p"
      });

      Calendar.setup({
        inputField : "f_date12",
        trigger    : "f_btn12",
        onSelect   : function() { this.hide() },
        showTime   : 12,
        dateFormat : "%Y-%m-%d %I:%M %p"
      });

      Calendar.setup({
        inputField : "f_date13",
        trigger    : "f_btn13",
        onSelect   : function() { this.hide() },
        showTime   : 12,
        dateFormat : "%Y-%m-%d %I:%M %p"
      });

      Calendar.setup({
        inputField : "f_date14",
        trigger    : "f_btn14",
        onSelect   : function() { this.hide() },
        showTime   : 12,
        dateFormat : "%Y-%m-%d %I:%M %p"
      });

<script> 

but no dice. It still refuses to fire even with the CSS and JS added…

  • 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-15T13:23:47+00:00Added an answer on June 15, 2026 at 1:23 pm

    I guess this is jsCalendar plugin.
    Your trigger: “f_btn1” should be an id attribute, not class in the anchor HTML tag.
    Like this:

    <a href="#" id="f_btn1" title="Select your date and time.">
    

    Instead of this:

    <a href="#" class="f_btn1" title="Select your date and time.">
    

    Also, you don’t need to wrap img within anchor tag. In the calendar documentation you read about “trigger” parameter:

    trigger — an ID of a <button> element (in fact any element type) that should trigger the popup calendar (the calendar hooks on the “onclick” event).
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im trying to use a background image in a trigger.io ios mobile app but
I am trying to trigger action via ajax but it doesn't call from some
I am trying to trigger a call to twitter app and tweet some useful
i am trying to display jquery calendar but somehow its just ignoring my request
I am trying to trigger the FB subscribe event, but the alert does not
I'm trying to trigger a javascript onMouseOver event without having the onMouseOver attribute on
I'm trying to trigger an event based on audio input but I have no
I am trying to trigger a keyup function to an appended elements, but all
I am having trouble trying to trigger a submit button in firefox 3.6 but
I'm simply trying to trigger a new activity from a button click but every

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.