Viewing 10 posts - 16 through 25 (of 25 total)
  • Author
    Posts
  • #103005
    admin
    Keymaster

    Hi,

    We are unable to reproduce it with the latest version. Please, check whether you use the most-recent files and clear your web browser’s cache.

    Best regards,
    Peter Stoev

    Smart UI Team
    https://www.htmlelements.com/

    #103019

    Sorry I was forced to change the account because I don’t receive mails anymore on the other account.

    Anyway I still find the problem.

    I suspect the problem coud be my PC language setting which is Italian.

    When I open the date picker I see all in english.

    Is there any specific setting for the datekeeper related to language ?

    Tks

    #103023
    admin
    Keymaster

    Hi,

    Only locale which defaults to ‘en’.

    Best regards,
    Peter Stoev

    Smart UI Team
    https://www.htmlelements.com/

    #103024

    My browser locale is it_IT and is correct but the datepicker still shows english captions and seems to work in american standard.

    Tks

     

    I got the browser language using

    function getLang() {
    if (navigator.languages != undefined)
    return navigator.languages[0];
    return navigator.language;
    }

    #103025
    admin
    Keymaster

    Hi,

    locale is a property. If you do not set it, it is not set automatically. The DateInput works with the settings set by the user. Otherwise, it uses default settings.

    Best regards,
    Peter Stoev

    Smart UI Team
    https://www.htmlelements.com/

    #103026

    Sorry but I still don’t understand where and how to set locale.

    I use :

    { label: ‘Campo data 1’, dataField: ‘C6’, cellsFormat: ‘dd/MM/yyyy’,
    editor: {
    template: ‘dateTimePicker’,
    formatString: ‘dd/MM/yyyy’,
    onInit(index, dataField, editor) {}}},

    but I don’t understand where set my locale.

    Tks

    #103027
    admin
    Keymaster

    Hi,

    Actually, here the issue is different. The data which comes from your data source is String, not a Date object so the format here is ambiguous. From new Date(“01/06/1954”) it will create 6 January 1954. If you pass a Date object instead of String in your data source it will work. In the next version, the dataField will include a formatString property in order to enable deserialization of string dates in the specific formats i.e you will be able to set it like that

    ` dataSource: new Smart.DataAdapter({
    dataSource: [{
    “C1”: “1”,
    “C2”: “Hot Chocolate”,
    “C4””: “SEAVISION”,
    “C6”: “01/06/1954”,
    “C5”: “true”,
    “C3”: “14g”
    }],
    dataFields:
    [

    { name: ‘C1’, dataType: ‘number’ },
    { name: ‘C2’, dataType: ‘string’ },
    { name: ‘C4’, dataType: ‘string’ },
    { name: ‘C5’, dataType: ‘bool’ },
    { name: ‘C3’, dataType: ‘string’ },
    { name: ‘C6’, dataType: ‘date’, formatString: ‘dd/MM/yyyy’ }
    ]
    })`

    Best regards,
    Peter Stoev

    Smart UI Team
    https://www.htmlelements.com/

    #103032

    Tks but I still don’t understand how to “pass a date” in a json datasource.

    Could You suggest the correct way ?

    Tks

     

     

    #103033
    admin
    Keymaster

    Simply try C6: “2016-06-23T09:07:21-07:00” as a date string.

    Best regards,
    Peter Stoev

    Smart UI Team
    https://www.htmlelements.com/

    #103034

    Tks, it seems to work.

    How can I force the calendar to appear in italian and not in english ?

    Tks

Viewing 10 posts - 16 through 25 (of 25 total)
  • You must be logged in to reply to this topic.