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

  • Home
  • SEARCH
  • 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 8834605
In Process

The Archive Base Latest Questions

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

I get an Unxepected Identifier editor with the following code. I’ve been troubleshooting it

  • 0

I get an Unxepected Identifier editor with the following code. I’ve been troubleshooting it all day, and nothing. Hoping a fresh pair of eyes can spot my error. I’m trying to use jQuery UI to set up a date-picker and then get and manipulate the date. Changing the date on the picker should change an image on the page associated with that date via ajax.

$(document).ready(function(){
// Datepicker
$('#datepicker').datepicker({
    dateFormat: 'yy-mm-dd',
    inline: true,
    minDate: new Date(2012, 06 - 1, 1),
    maxDate:new Date(2012, 09 - 1, 31),
    onSelect: function(){
       var day1 = ($("#datepicker").datepicker('getDate').getDate()).toString().replace(/(^.$)/,"0$1");              
       var month1 = ($("#datepicker").datepicker('getDate').getMonth() + 1).toString().replace(/(^.$)/,"0$1");             
        var year1 = $("#datepicker").datepicker('getDate').getFullYear();
        var fullDate = year1 + "/" + month1 + "/" + day1;
        var dashDate = year1 + "-" + month1 + "-" + day1;
        var str_output = "<a id=\"single_image\" href=\"http://www.lasalle.edu/150/dayinhistory/" + fullDate + ".jpg\" title=\"\"><img src=\"http://www.lasalle.edu/scripts/timthumb/timthumb.php?src=http://www.lasalle.edu/150/dayinhistory/" + fullDate + ".jpg&w=560&h=350&zc=1&a=t\">";
        $('#this-day-photo-archive').html(str_output);
        var data = 'day=' + dashDate;
            $.ajax({
                url: 'http://www.lasalle.edu/150/content/day_grab.php',
                type: "GET", 
                data: data,     
                cache: false,
                success: function(html) {
                    $('#this-day-info').html(html);
                    console.log (html);
                    $(".left").click(function() {
                        $('#datepicker').datepicker( "setDate" , -1d );
                    });
                    $(".right").click(function() {
                        $('#datepicker').datepicker( "setDate" , +1d );
                    });
                }
            });
    } 

});

});
  • 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-14T09:03:36+00:00Added an answer on June 14, 2026 at 9:03 am

    You should replace

     $('#datepicker').datepicker( "setDate" , -1d );
    

    with

     $('#datepicker').datepicker( "setDate" , "-1d" );
    

    (and the same for +1d)

    A link to some examples for confirmation

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

Sidebar

Related Questions

I get following error with following Objective-C code, while trying to compile it with
I'm trying to get JSON data from a website using the following code, but
In the following script I get an error: syntax error: unexpected end of file
In running this on index.html, I get the following error: Uncaught SyntaxError: Unexpected token
I am trying to compress my JavaScript code to get less traffic on my
Well I'm trying to get into Node.js / Express.js - however I've been having
I keep getting the Syntax Error: Unexpected identifier JS error with this code: function
Hello I am having problems with Jade and Node.JS I have the following code
I compiled the following program with gcc 4.4.1 and I get unexpected output (Well,
I'm using the following code listed in the processingjs docs to load an image

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.