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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T19:11:27+00:00 2026-05-21T19:11:27+00:00

I am trying to the following: user clicks on a specific date fancybox opens

  • 0

I am trying to the following:

  • user clicks on a specific date
  • fancybox opens with data entry options
  • capture the date on which the calendar was clicked
  • grab that date and inject it into the value of a text input

This is my code:

$("a#inline").fancybox();

$('#calendar').fullCalendar(
{
    dayClick: function (date)
    {
        $('a#inline').click();
        $('.datepicker').val(date);
    }
});

HTML

<a href="#data_entry" id="inline">Add Event</a>

<div style="display:none">
    <div id="data_entry">
        <form action="events/events_save" method="post" name="events_form" id="events_form">
         <input type="text" name="date" value="<?php date('m/d/Y'); ?>" class="datepicker">
        </form>
    </div>
</div>

I am running into the following issues:

  • when clicking on a date on the calendar the fancybox pops up and I get Mon Apr 25 2011 00:00:00 GMT-0400 (EDT) ==> I need this to be mm/dd/yy like 04/25/11

  • if right after that I close the fancybox and click on the anchor tag "Add Event", the fancybox opens but the date is populated with Mon Apr 25 2011 00:00:00 GMT-0400 (EDT) ==> it should actually contain today’s date because of the PHP string I put in the value field (this is fixed only if I refresh)

Anyone have suggestions on how to solve either issue?

Thanks a ton.

  • 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-21T19:11:28+00:00Added an answer on May 21, 2026 at 7:11 pm

    To format dates, run the date through fullcalendar’s formatDate method. Try:

    $('.datepicker').val($.fullCalendar.formatDate( date, "MM/dd/yy"));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I hope someone can help with the following. I'm trying to create a user-specific
What I'm trying to do is the following: The user clicks on an link
I am trying following, 1. Get response using Ajax from the users selection which
I'm trying the following command in PHP 5.2.12 : print (date('Y-m-d', strtotime('2009-12 last day')));
I am trying to use the following javascript code to alert the user when
I am trying to build an application which does the following : 1) write
I am trying to implement the following functionality: Flex data grid has 1 default
I am trying to hide a div after a user clicks on the document.
I'm trying to open a Jquery UI dialog box after the user clicks on
So I'm trying to do some event handling when a user clicks the like

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.