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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T21:25:23+00:00 2026-06-04T21:25:23+00:00

I need to put my datepicker in a new div, that will be a

  • 0

I need to put my datepicker in a new div, that will be a (shadow-)border-div.

I’ve tried the following:

beforeShow: function (input) {
  $(input).datepicker("widget")
   .find(".ui-datepicker-header, ui-datepicker-calendar")
   .wrapAll("<div class='datepickerBorder'/>");
}

But it does not work.

Additionally I’ve tried to wrap the whole picker, but then the border-div has not the same position, size, etc.

  • 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-04T21:25:24+00:00Added an answer on June 4, 2026 at 9:25 pm

    The datepicker control is absolutely positioned. Wrapping it inside an element will not contain the datepicker inside that element — the wrapping element will just sit at the bottom of the page while the datepicker will render next to the control.

    Solution 1: You can add the class to the datepicker widget itself:

    $("#datepicker2").datepicker({
        beforeShow: function() {
            $(this).datepicker("widget").addClass("datepickerBorder");
        },
        onClose: function() {
            $(this).datepicker("widget").removeClass("datepickerBorder");
        }
    });
    

    demo

    Solution 2: create an absolutely positioned + hidden wrapping div on DOM load and re-position + re-size the div behind the datepicker when it shows. There is a catch: you cannot check the widget’s offset (the co-ordinates at which it will render) inside the beforeShow function.

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

Sidebar

Related Questions

I need to put a one second delay in this jQuery function so that
I just need put one div (or more) inside or over map, something like
I have hundreds of .doc files with text that I need put on web
I need to put following code in the constructor of my startup form. JohnKenedy.BusinessSQLEXPRInstaller
I need to put an alpha blended gradient border around an image. My problem
I need to put some markers in my flash animation that can be used
I need to put data in a file since my other function takes a
I need to put a underoot symbol on dialog that i am creating in
I need to put it some custom logic into my iPhone app so that
I need to put a JSpinner in a JOptionPane. Here is what I've tried:

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.