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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T16:34:38+00:00 2026-06-14T16:34:38+00:00

Having problems making my events calender from the existing datepicker in jQuery UI. This

  • 0

Having problems making my “events calender” from the existing datepicker in jQuery UI.

This is the code that I’ve come up with so far.

    <script>
    $(document).ready(function() {
        $("#datepicker").datepicker({
            onSelect: function(dateText, inst) {
                var myDate = new Date(dateText);
                var newFormat = $.datepicker.formatDate("yy-mm-dd", myDate);
                    if (newFormat === "2012-11-20") {
                        $("#div").html("KIING");
                    } else if (newFormat === "2012-11-21") {
                        $("#div").html("KIIIIIIING");
                    } else if (newFormat === "2012-11-03") {
                        $("#div").html("1234123");
                    } else {
                        $("#div").html("");
                    }
            }
        });
    });
</script>
<div id="datepicker"></div>
<div id="div"></div>

http://jsfiddle.net/ALrkB/

I have gotten stuck here, i don’t know how to make the code better and so that you don’t have to insert the code manually for every event.

The thought is that the user login to the CMS and adds a query with DATE and EVENT and it connects to the jQuery code.

  • 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-14T16:34:39+00:00Added an answer on June 14, 2026 at 4:34 pm

    That should do the trick

    <script>
       $(document).ready(function() {
        $("#datepicker").datepicker({
            onSelect: function(dateText, inst) {
                var ajaxCfg = {
                    url: '/your/path/to/data',
                    data: {selectedDate: dateText},
                    type: 'POST',
                    success: function(data) {
                      $("#div").html($(data).html());
                    }
                };
                $.ajax(ajaxCfg);
            }
        });
    });
    </script>
    <div id="datepicker"></div>
    <div id="div"></div>
    

    On the server side, you will need to get the post value for selectedDate and the current user, then make a query to your event database and return the data to the script.

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

Sidebar

Related Questions

I'm having problems making Lua & Luabind work under Windows 7 using VS 2010.
I am not using GraphViz because I am having problems with making it play
I'm having some problems with making my tests insert fake data in my database.
I am currently making a facebook app and am having some problems with permissions.
Having problems with a small awk script, Im trying to choose the newest of
I'm having trouble making a JMenuItem in one class pull up a JTree from
I am programmatically building a UINavigationContoller for iOS and am having problems making it
I'm having problems making the Html.Editor rendering the desire HTML. Here is the scenario:
I'm starting with Flask, and I'm having some problems with jQuery and (I think)
I'm making an auto clicker that uses jna to hook global input from the

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.