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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T10:05:20+00:00 2026-06-13T10:05:20+00:00

When I use the jquery datepicker, it almost always is configured as such: $(‘#dateFld’).datepicker({

  • 0

When I use the jquery datepicker, it almost always is configured as such:

$('#dateFld').datepicker({ 
  dateFormat: 'mm/dd/yy', 
  showOn: 'button', 
  buttonText: 'Edit date value', 
  buttonImage: '<s:url includeParams="none" value="/images/calendar.gif"/>', 
  buttonImageOnly: true 
});

...

<p>Date: <input type="text" id="dateFld" /></p>

The only thing that tends to change each time I define a field like this is the buttonText value. I would love to be able to use the input field’s title attribute as the buttonText value so that I could configure all my datepickers using a .datepicker class selector instead. Something like this:

$('.datepicker').datepicker({ 
  dateFormat: 'mm/dd/yy', 
  showOn: 'button', 
  buttonText: $(this).attr('title'), 
  buttonImage: '<s:url includeParams="none" value="/images/calendar.gif"/>', 
  buttonImageOnly: true 
});

...

<p>Date: <input class="datepicker" type="text" id="dateFld" title="Edit date value" /></p>

This approach almost works, but I’m ending up with the title from the page, not the selected input field. Thoughts?

  • 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-13T10:05:21+00:00Added an answer on June 13, 2026 at 10:05 am
    $('.datepicker').each(function() {
        $currentDatepicker = $(this);
        $currentDatepicker.datepicker({ 
           dateFormat: 'mm/dd/yy', 
           showOn: 'button', 
           buttonText: $currentDatepicker.attr('title'), 
           buttonImage: '<s:url includeParams="none" value="/images/calendar.gif"/>', 
           buttonImageOnly: true 
        });
    });
    

    This should work !

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

Sidebar

Related Questions

I have customized jqGrid's edit form to have some fields that use jQuery's DatePicker
I'm looking for the right wildcard character to use with jquery.datepicker.parseDate() in the doc
I Download Jquery datepicker from http://jqueryui.com/demos/datepicker/ and use it,know I want to my calndar's
I'm usung the jQuery datepicker. In my EndDate textbox I'd like to use the
Hey Guys, i have a big problem with my jQuery Datepicker Script. I use
I use a jquery datepicker then i read it in my servlet like that:
I want to use the Jquery datepicker. I've got it setup using an the
I'm tyring to style the jQuery datepicker. I can't use a jQuery theme as
I am trying to use the jQuery Datepicker to display specific info from JSON
I want to use the jQuery UI Datepicker for the following scenario. The user

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.