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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T13:21:16+00:00 2026-06-09T13:21:16+00:00

I have been trying to make JQuery DateTimePicker add-on to work with asp.net textbox

  • 0

I have been trying to make JQuery DateTimePicker add-on to work with asp.net textbox for over a week. I simply can’t get it and I don’t know why.

Could you please help me in getting it work?

ASP.NET code:

<asp:Content ID="Content2" ContentPlaceHolderID="bodyContent" Runat="Server">
<style type="text/css">
/* css for timepicker */
.ui-timepicker-div .ui-widget-header{ margin-bottom: 8px; }
.ui-timepicker-div dl{ text-align: left; }
.ui-timepicker-div dl dt{ height: 25px; }
.ui-timepicker-div dl dd{ margin: -25px 0 10px 65px; }
.ui-timepicker-div td { font-size: 90%; }
</style>

<script src="Scripts/jquery-ui-timepicker-addon.js" type="text/javascript"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>
    <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" />
<script type="text/javascript">
    $(function () {
        $("#start_DateTime").datetimepicker();
        $("#end_DateTime").datetimepicker();
    });
</script> 

<label for="start_DateTime">
                            Start Date & Time</label>
                        <asp:TextBox ID="start_DateTime" CssClass="textarea" runat="server"></asp:TextBox> </asp:Content>

Nothing shown in this textbox. Also, before browsing the page in the Internet Explorer, I got the following error message and I don’t know why:

enter image description here

UPDATE:

I modified my code to include

$('#' + '<%= start_DateTime.ClientID %>').datetimepicker();

Instead of

$("#start_DateTime").datetimepicker();

and I am still getting the same error. When I run the Jscript debugger in the IE, it shows me the following:

enter image description here

UPDATE #2:

Finally I got it but I don’t know why it appears at the top of the textbox. It should be appeared at underneath it and to the right.

enter image description here

  • 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-09T13:21:17+00:00Added an answer on June 9, 2026 at 1:21 pm

    Load the timepicker add-on AFTER the jquery ui. The datetimepicker add-on has dependencies with jquery ui.

    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>
    <script src="Scripts/jquery-ui-timepicker-addon.js" type="text/javascript"></script>
    

    Try:

    $('#' + '<%= start_DateTime.ClientID %>').datetimepicker();
    

    If you don’t account for the id that is generated by asp.net you could do it by a class instead.

    <asp:TextBox ID="start_DateTime" CssClass="textarea datepicker" runat="server"></asp:TextBox>
    
    
    $(function(){
       $(".datepicker").datetimepicker();
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been trying to make something work with JQuery. I have the following
I have been trying to make jquery datepicker plugin work on a content page
i have been trying to make 2 scripts(1 mootol and 1 jquery) work at
I have been trying to make this to be a little jQuery plugin that
I have been trying to make it work with either fwrite or fputcsv but
Hello I have been trying to make this form work with no luck, So
I have been trying to make a jQuery function which selects all the checkboxes
Hi I have been trying to make a show/hide toggle button with jquery but
So I have been trying to write jquery that make one element become active
I am trying to make some text scroll vertically using jQuery, I have been

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.