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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T03:05:51+00:00 2026-05-19T03:05:51+00:00

becouse textboxes are stored in viewstate i cannot use this JS code <script type=text/javascript>

  • 0

becouse textboxes are stored in viewstate i cannot use this JS code

<script type="text/javascript">
$(function() {
    $.datepicker.setDefaults($.datepicker.regional["sl"]);
    $(".inputTypeDate").datepicker({
        dateFormat: "dd.mm.yy",
        changeMonth: true,
        changeYear: true
    });
});
</script>

becouse code of textboxes are not visible in source code.

so i try to use this with onlcick event.

html example:

<p>Date: <input type="text" id="datepicker" onClick="$(function() {$( '#datepicker' ).datepicker({changeMonth: true,    changeYear: true});});"></p>

which works but only when i click second time on textbox. How to enable calendar on first click?

  • 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-19T03:05:51+00:00Added an answer on May 19, 2026 at 3:05 am

    If you are having multiple textboxes with the same id it will be invalid.

    Add a class name for the textboxes and bind the handler to those objects. Something like

    $(function(){
        $("input:text.inputTypeDate").datepicker({
            dateFormat: "dd.mm.yy",
            changeMonth: true,
            changeYear: true
        });
    });
    
    
    <input type="text" class="inputTypeDate" />
    

    Edit

    I don’t know why you are not able to view the element in the source code. Are you dynamically generating the element(AJAX response). If it is a dynamically created element then you will need to add the handlers using a plugin like livequery

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

Sidebar

Related Questions

I was just watching a how-to type WPF video called How Do I: Use
I have this xaml textbox <TextBox Text={Binding ProdFilter.Min, Mode=OneWayToSource, UpdateSourceTrigger=PropertyChanged, TargetNullValue=''} Width=50 DockPanel.Dock=Right TabIndex=3
to add new letter to textbox i use Textbox.Text = Textbox.Text + ; adds
Scratch this! I have googled my ass off looking for this. 1. Lets say
This is a follow up to my post back in August: Asks for AD
I have an Access 2003 project in which all data is stored in SQL
This is going to be a long post. I would like to have suggestions
I have WPF window with several textboxes, buttons, and canvas where I draw a
I have a page that has a few textboxes and a dropdownlist. When a
The background I use VS2010, DataGrid (the one delivered with WPF) and I manually

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.