[OutSystems UI Web] DatePicker - Initial Date does not work correctly

Forge Component
(34)
Published on 24 Jun (3 days ago) by OutSystems R&D
34 votes
Published on 24 Jun (3 days ago) by OutSystems R&D

HI,

I have the "DD-MM-YYYY" format configured, but it does not interpret the default format for the initial date.


Ex: 06/12/2018 interpreted as June 6, 2018, only for the initial date. Then when selecting works correctly.

I use datetype date or datetime for my variable

Hi Horacio Villalba,

Configure the date format on the your service center:

You should verify if variable field have dateprettyformat associated. If true, deleted this format. 


Give me feedback please

best regards


Hi,


I have already configured in the service center DD/MM/YYYY

Tiago Queirós wrote:

Hi Horacio Villalba,

Configure the date format on the your service center:

You should verify if variable field have dateprettyformat associated. If true, deleted this format. 


Give me feedback please

best regards



Horacio Villalba wrote:


Hi,


I have already configured in the service center DD/MM/YYYY

Tiago Queirós wrote:

Hi Horacio Villalba,

Configure the date format on the your service center:

You should verify if variable field have dateprettyformat associated. If true, deleted this format. 


Give me feedback please

best regards



You should verify if variable field have dateprettyformat associated. If true, deleted this format


My variable is datetime type, I don’t use prettyformat, the input parameter initialdate of datepicker is datetime too



Tiago Queirós wrote:

Horacio Villalba wrote:


Hi,


I have already configured in the service center DD/MM/YYYY

Tiago Queirós wrote:

Hi Horacio Villalba,

Configure the date format on the your service center:

You should verify if variable field have dateprettyformat associated. If true, deleted this format. 


Give me feedback please

best regards



You should verify if variable field have dateprettyformat associated. If true, deleted this format




Horacio Villalba wrote:

My variable is datetime type, I don’t use prettyformat, the input parameter initialdate of datepicker is datetime too



Tiago Queirós wrote:

Horacio Villalba wrote:


Hi,


I have already configured in the service center DD/MM/YYYY

Tiago Queirós wrote:

Hi Horacio Villalba,

Configure the date format on the your service center:

You should verify if variable field have dateprettyformat associated. If true, deleted this format. 


Give me feedback please

best regards



You should verify if variable field have dateprettyformat associated. If true, deleted this format




HI

Can you show pictures of your screen?

Regards

Hi,

I found several problems in javascript regarding the date format.


Here, Use hardcore format


Here,

new Date(initDate), Does not use the format "DD - MM -YYYY", returning an invalid date.


And example

SyntaxEditor Code Snippet

    function setInput(picker) {
        valueForInput = moment(new Date(initDate)).format(format);
        
        // if the user puts the option in the AdvancedFormat for input to begin as an empty string
        if(options.beginEmpty) {
            valueForInput = "";
        } 
        
        field.value = valueForInput;
    }


I made a clone to perform a workaround until it is corrected


Tks


Tiago Queirós wrote:

Horacio Villalba wrote:

My variable is datetime type, I don’t use prettyformat, the input parameter initialdate of datepicker is datetime too



Tiago Queirós wrote:

Horacio Villalba wrote:


Hi,


I have already configured in the service center DD/MM/YYYY

Tiago Queirós wrote:

Hi Horacio Villalba,

Configure the date format on the your service center:

You should verify if variable field have dateprettyformat associated. If true, deleted this format. 


Give me feedback please

best regards



You should verify if variable field have dateprettyformat associated. If true, deleted this format




HI

Can you show pictures of your screen?

Regards




Horacio Villalba wrote:

Hi,

I found several problems in javascript regarding the date format.


Here, Use hardcore format


Here,

new Date(initDate), Does not use the format "DD - MM -YYYY", returning an invalid date.


And example

SyntaxEditor Code Snippet

    function setInput(picker) {
        valueForInput = moment(new Date(initDate)).format(format);
        
        // if the user puts the option in the AdvancedFormat for input to begin as an empty string
        if(options.beginEmpty) {
            valueForInput = "";
        } 
        
        field.value = valueForInput;
    }


I made a clone to perform a workaround until it is corrected


Tks


Tiago Queirós wrote:

Horacio Villalba wrote:

My variable is datetime type, I don’t use prettyformat, the input parameter initialdate of datepicker is datetime too



Tiago Queirós wrote:

Horacio Villalba wrote:


Hi,


I have already configured in the service center DD/MM/YYYY

Tiago Queirós wrote:

Hi Horacio Villalba,

Configure the date format on the your service center:

You should verify if variable field have dateprettyformat associated. If true, deleted this format. 


Give me feedback please

best regards



You should verify if variable field have dateprettyformat associated. If true, deleted this format




HI

Can you show pictures of your screen?

Regards





Very well.

Good job.


Regards.