jQuery UI Widgets Forums Editors Calendar Calendar Today Button Internacionalization

This topic contains 2 replies, has 2 voices, and was last updated by  filipe.miranda 11 years, 10 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • Hello,

    I’m having some trouble on changing the today string. I made as indicated in docs, but it doesn’t work. Here is my code:

    		this.$el.jqxCalendar({
    width: '300px',
    height: '300px',
    showOtherMonthDays: false,
    enableWeekend: true,
    theme: 'bootstrap',
    enableFastNavigation: true,
    showFooter: true,
    navigationDelay: 0,
    culture: app.selectedLanguage,
    todayString: 'Bla',
    titleHeight: 30
    }).on('change viewChange', this.change);

    I also don’t want to show the “Clear” button on this calendar. Is this possible?

    Thanks,
    Filipe


    Peter Stoev
    Keymaster

    Hi,

    Here’s how to localize the Today and Clear:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" />
    <script type="text/javascript" src="../../scripts/gettheme.js"></script>
    <script type="text/javascript" src="../../scripts/jquery-1.8.3.min.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxcore.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxdatetimeinput.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxcalendar.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxtooltip.js"></script>
    <script type="text/javascript" src="../../jqwidgets/globalization/globalize.js"></script>
    </head>
    <body class='default'>
    <div id='content'>
    <script type="text/javascript">
    $(document).ready(function () {
    // create jqxcalendar.
    $("#jqxWidget").jqxCalendar({showFooter: true, width: 220, height: 220 });
    var localization = $("#jqxWidget").jqxCalendar('localization');
    localization.todayString = "ABC";
    localization.clearString = "XYZ";
    $("#jqxWidget").jqxCalendar('localization', localization);
    });
    </script>
    <div id='jqxWidget'>
    </div>
    </div>
    </body>
    </html>

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    Thanks, it worked!

    Now, in my case I don’t need the “Clear” button. I’ve tried to set his label to ‘ ‘. I worked, but the today button was not aligned to the center. Is there any other way to do this?

    Thanks,
    Filipe

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.