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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:33:16+00:00 2026-05-27T23:33:16+00:00

There is a textbox that requires a date but has no date picker. I

  • 0

There is a textbox that requires a date but has no date picker. I would like to add one with Greasemonkey. I looked for an example but could not find one.

Is this possible? Is there an example for doing this? It doesn’t need to be fancy.

  • 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-27T23:33:16+00:00Added an answer on May 27, 2026 at 11:33 pm

    I like to use jQuery UI’s datepicker() because I usually have jQuery UI loaded anyway, and it’s fairly well-known/supported.

    Unfortunately, the datepicker functionality uses some criminally-bad event code, which requires a little fudging to work in a sandboxed environment.

    Still, its not too difficult. Here is a complete Greasemonkey script:

    // ==UserScript==
    // @name        _Datepicker fun
    // @include     http://YOUR_SERVER/YOUR_PATH/*
    // @include     http://jsbin.com/ukelij*
    // @require     http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js
    // @require     https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js
    // @resource    jqUI_CSS  http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/themes/base/jquery-ui.css
    // ==/UserScript==
    
    //--- Date picker needs additional CSS
    GM_addStyle (GM_getResourceText ("jqUI_CSS") );
    
    //--- Add datepicker popups to select inputs:
    $("#pickMe").datepicker ();
    $("#pickMe").click ( function () {
        setTimeout (cleanUpCrappyEventHandling, 100);
    } );
    
    /*--- Clean up ultra-crappy event handling ('til dev team eventually fixes).
        This must be done to allow the picker to work in a sandboxed environment.
        Alternately, you can modify the jQuery-UI source ala http://stackoverflow.com/q/2855403
    */
    function cleanUpCrappyEventHandling () {
        var nodesWithBadEvents  = $(
            "div.ui-datepicker td[onclick^='DP'], div.ui-datepicker a[onclick^='DP']"
        );
        nodesWithBadEvents.each ( function () {
            var jThis       = $(this);
            var fubarFunc   = jThis.attr ("onclick");
    
            /*--- fubarFunc will typically be like:
                DP_jQuery_1325718069430.datepicker._selectDay('#pickMe',0,2012, this);return false;
            */
            fubarFunc       = fubarFunc.replace (/return\s+\w+;/i, "");
    
            jThis.removeAttr ("onclick");
            jThis.click ( function () {
                eval (fubarFunc);
                cleanUpCrappyEventHandling ();
            } );
        } );
    }
    

    You can load this and test it against this page at jsBin.

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

Sidebar

Related Questions

Is there a way to hide the textbox that is targeted by the colorpickerextender
In .Net, there is the MaskedTextBox and there is the TextBox which has an
Question: Is there any reason Autocomplete=off on a ASP:Textbox would not be working in
I have a textbox that is bound to a property that requires a value,
I have a webpage that requires login. Once a user has logged in I
Is there any html form class(text box) that does not allow null values. The
Hi there im using a single TextBox for querying differents types of chossings, for
Is there anyway in XAML only to have a linebreak in a TextBox? I
Is there a way to get an ASP.NET textbox to accept only currency values,
Is there a MVVM way to select text in a textbox? The MVVM framework

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.