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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:56:32+00:00 2026-05-25T15:56:32+00:00

I have successful inserted datepicker into my webpage and it works smoothly now. What

  • 0

I have successful inserted datepicker into my webpage and it works smoothly now. What I need to achieve is that after changing the language from language selector, datepicker must reflect this, show the selected language text.

I have the following code, I could not manage to work it so far cause I do not know jquery well. Hope to give someone feedback

<head>
 <script type="text/javascript" src="/scripts/datepicker.core.js"></script>   
 <script type="text/javascript" src="/scripts/datepicker.jquery.ui.min.js"></script> 
 <script type="text/javascript" src="/scripts/jquery.ui.datepicker-tr.js"></script>
 <script type="text/javascript" src="/scripts/jquery.ui.datepicker-en-GB.js"></script>
</head>
<body>
    <div id="LanguageSelector">
                <form method="get" action="/"><select id="LanguageDropDownList" name="lang"  onchange="javascript:location='/?lang=' + this.options[this.selectedIndex].value" ><option value="en" selected="selected" >English (en)</option><option value="tr">Türkçe (tr)</option></select><noscript><input type="submit" value=">"></noscript></form>
    </div>

        <div class="calendar" id="datepicker"></div>

        <script type="text/javascript">
            var initialCalendar = true;
            $(function() {   
                $.datepicker.setDefaults( $.datepicker.regional[ ' ' ] );
                var eventDays = [<%=dateOfEvent%>];
                $('#datepicker').datepicker($.datepicker.regional[ 'tr' ],
                {         
                    inline: true,
                    dateFormat: 'yy-mm-dd',
                    changeMonth: true,
                    changeYear: true,
                    onSelect: function(date) {
                        if(!initialCalendar){
                            for(var i in eventDays){
                                if(eventDays[i].Date == date){
                                    window.location = eventDays[i].Url;
                                }
                            }
                        }else{
                            initialCalendar = false;
                        }
                    },
                    beforeShowDay: function(thedate) {
                        thedate = thedate.format("yyyy-MM-dd");
                        for(var i in eventDays){
                            if(eventDays[i].Date == thedate){
                                return [true,""];
                            }
                        }
                        return [false, ""];
                    }
                });

                $( '#LanguageDropDownList' ).change(function() {
                    $( '#datepicker' ).datepicker( "option",
                        $.datepicker.regional[ $( this ).val() ] );
                });
            });

            Date.prototype.format = function(format)  
            {
               var o = {
                 "M+" : this.getMonth()+1,
                 "d+" : this.getDate(),
                 "h+" : this.getHours(),
                 "m+" : this.getMinutes(),
                 "s+" : this.getSeconds(),
                 "q+" : Math.floor((this.getMonth()+3)/3),
                 "S" : this.getMilliseconds()
               }
               if(/(y+)/.test(format)) format=format.replace(RegExp.$1,
                 (this.getFullYear()+"").substr(4 - RegExp.$1.length));
               for(var k in o)if(new RegExp("("+ k +")").test(format))
                 format = format.replace(RegExp.$1,
                   RegExp.$1.length==1 ? o[k] :
                 ("00"+ o[k]).substr((""+ o[k]).length));
               return format;
            }
         </script>
</body>
  • 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-25T15:56:32+00:00Added an answer on May 25, 2026 at 3:56 pm

    It seems to be working fine as well: http://jsfiddle.net/repw4/936/.

    If it still doesn’t work for you, try to destroy the datepicker and re-initiate it:

    $('#LanguageDropDownList').change(function() {
        $('#date').datepicker('destroy')
            .datepicker($.datepicker.regional[$(this).val()]);
    });
    

    See it in action: http://jsfiddle.net/repw4/936/

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

Sidebar

Related Questions

I have made a very successful PHP chat box that saves the chat to
i have a php page that redirects (if successful) to another php page like
I have a login script that when successful, should check to see if the
I have a test that is successful (among other things) if a certain callback
I have two insert statements. The second one will be executed only after successful
I have an INSERT statement that looks like this: INSERT INTO officer (officer_number, name,
i have created table using Sqlite3.and also inserted record in that table.its running successfully.but
Using Doctrine DBAL, I have some code that inserts a new row into the
I have successful connected to the login page, however, i'm not sure how to
I have been successful with creating a Telerik grid to display a list of

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.