jQWidgets Forums

jQuery UI Widgets Forums Grid Setting calendar culture inside grid

This topic contains 6 replies, has 2 voices, and was last updated by  alexz 12 years, 5 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
  • Setting calendar culture inside grid #11521

    alexz
    Member

    Hi, how can I set culture for calendar that is inside grid (columntype: ‘datetimeinput’)?

    When trying to figure it out myself, I found a strange line of code inside jqxcalendar:

    a.global.preferCulture(this.culture);

    Why calendar is trying to set own culture globally? At the beginning of my page I have following line of code and I expect that setting not to be changed:

    jQuery.global.preferCulture('fi-FI');

    Any help appreciated,
    BR, Alex.

    Setting calendar culture inside grid #11522

    Peter Stoev
    Keymaster

    Hi Alex,

    The calendar sets a culture depending on its ‘culture’ property. You can set a culture in the createeditor function.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Setting calendar culture inside grid #11528

    alexz
    Member

    Thanks for prompt reply, now I added following functions (initeditor added after no success with createeditor):

    createeditor:function (row, value, editor) { editor.jqxCalendar({ culture: 'fi-FI' }); }, initeditor:function (row, value, editor) { editor.jqxCalendar({ culture: 'fi-FI' }); }

    but with no success, tried also to remove

    columntype: 'datetimeinput'

    but then column has just textbox editor.

    Setting calendar culture inside grid #11530

    alexz
    Member

    Do I have to set also formatString of jqxdatetimeinput?

    Setting calendar culture inside grid #11532

    Peter Stoev
    Keymaster

    Hi Alex,

    The editor used in the Grid is jqxDateTimeInput, not jqxCalendar.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Setting calendar culture inside grid #11534

    alexz
    Member

    Thanks Peter, now works like a charm!

    Setting calendar culture inside grid #11545

    alexz
    Member

    Unfortunately still have a problem, calendar comes localized, but date is in default culture format, like 11.27.2012, should be 27.12.2012

    createeditor:function (row, value, editor) { editor.jqxDateTimeInput({ culture: 'fi-FI' }); }
Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.