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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T06:58:00+00:00 2026-05-29T06:58:00+00:00

I have developed a web application that uses the jQuery DateTimePicker by Trent Richardson

  • 0

I have developed a web application that uses the jQuery DateTimePicker by Trent Richardson
(see http://trentrichardson.com/examples/timepicker/)

This is a C# aps.net app, that has a field called tbDate, because I have a MasterPage, this field is known as #MainContent_tbDate to jQuery.

In the backend C# code the following line has been added to the PagePreRenderComplete event.

 tbDate.Attributes.Add("onFocus", "getDate('#MainContent_tbDate');");

This as you can see simply adds an onFocus event to the field. (This works for 12 other fields)

In my .js file I have the following code.

    //This function launches the date picker
    function getDate(field){
        if (debug)
            {
                $.jGrowl("Displaying Date for field " + field);
            }
            $(field).datetimepicker({
                dateFormat:'dd/mm/yy',
                timeFormat:'hh:mm'
             });
        if (debug) {
            $.jGrowl("Launched " + field);
        }
    }

This is run when the field gets focus. Now the issue is the first time it does get focus I see my first jGrowl message, Then NO Date Picker, then I see my second jGrowl message.

I get no Scripting errors.

If I take focus away from the field and then give it back I see the date picker correctly.

Why don’t I see it the first time the field gets focus?????

Thanks

SM

  • 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-29T06:58:01+00:00Added an answer on May 29, 2026 at 6:58 am

    try this:

    function getDate(field){
          $(function(){ 
             if (debug)
                {
                    $.jGrowl("Displaying Date for field " + field);
                }
                $(field).datetimepicker({
                    dateFormat:'dd/mm/yy',
                    timeFormat:'hh:mm'
                 });
            if (debug) {
                $.jGrowl("Launched " + field);
            }
    }) 
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have developed a web application that uses a web server and database hosted
We have developed a .NET web application that uses SQL Server as a backend.
I have developed web application which uses JasperReports for reporting purpose. In that I
I have a web application that uses jQuery to dynamically create an silverlight object.
I have developed a web application for mobile phones that uses JavaScript Google API.
I have developed a web application and various clients can store records to that
I have a web application developed with ASP.net and C# that is running on
We have built a hosted web application, that is developed in a way that
I have developed an image uploading application that uses Flash to load an image,
I have a ASP.NET web application that uses Themes. Inside the theme directory are

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.