Jump to content

Automatically fill standard datetimepicker pt_BR


robinhodemorais

Recommended Posts

I realized that by default in the unidatetimepicker when you type the day it completes with the month and current year, when you type the day and month it fills the year, this without having to inform the bar, however for the brazil pattern when you type the day and month it does not fill in correctly, for example, if you type 0806 and type tab, it fills 08/06/2020, how do I make it fill correctly according to the Brazilian standard?

datetimerpicker.gif

DateFormat is configured this way: dd / MM / yyyy

Link to comment
Share on other sites

2 hours ago, robinhodemorais said:

I realized that by default in the unidatetimepicker when you type the day it completes with the month and current year, when you type the day and month it fills the year, this without having to inform the bar, however for the brazil pattern when you type the day and month it does not fill in correctly, for example, if you type 0806 and type tab, it fills 08/06/2020, how do I make it fill correctly according to the Brazilian standard?

Hello,

This post may help you:

 

Link to comment
Share on other sites

perfect, I made some adjustments according to my standard and it worked correctly ...

function beforeInit(sender, config)
{
  config.altFormats="dmY|d/m/Y|j/n/Y|j/n/y|j/m/y|d/m/y|j/m/Y|d/n/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|d-m-Y|j-n|j/n";
}

however, I have to do this for each datetimepicker I have on the system, can I do it in a way that replicates for everyone?

Link to comment
Share on other sites

1 hour ago, robinhodemorais said:

perfect, I made some adjustments according to my standard and it worked correctly ...


function beforeInit(sender, config)
{
  config.altFormats="dmY|d/m/Y|j/n/Y|j/n/y|j/m/y|d/m/y|j/m/Y|d/n/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|d-m-Y|j-n|j/n";
}

however, I have to do this for each datetimepicker I have on the system, can I do it in a way that replicates for everyone?

+1

  • Like 1
Link to comment
Share on other sites

16 minutes ago, Sherzod said:

You can try to use this approach, by changing the value to the required.

 

perfect thank you.

MainForm.Script:

Ext.form.field.Date.prototype.altFormats="dmY|d/m/Y|j/n/Y|j/n/y|j/m/y|d/m/y|j/m/Y|d/n/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|d-m-Y|j-n|j/n";

 

  • Like 2
Link to comment
Share on other sites

  • 5 months later...

As far as I remember this was already resolved, but with version 39 it came back

  // CONFIGURING REGIONAL CONFIGURATIONS
  UniGuiApplication.PFmtSettings.ThousandSeparator: = '.';
  UniGuiApplication.PFmtSettings.DecimalSeparator: = ',';
  UniGuiApplication.PFmtSettings.CurrencyDecimals: = 2;
  UniGuiApplication.PFmtSettings.DateSeparator: = '/';
  UniGuiApplication.PFmtSettings.ShortDateFormat: = 'dd / mm / yyyy';
  UniGuiApplication.PFmtSettings.LongDateFormat: = 'dd / mm / yyyy';
  UniGuiApplication.PFmtSettings.TimeSeparator: = ':';
  UniGuiApplication.PFmtSettings.TimeAMString: = 'AM';
  UniGuiApplication.PFmtSettings.TimePMString: = 'PM';
  UniGuiApplication.PFmtSettings.ShortTimeFormat: = 'hh: mm';
  UniGuiApplication.PFmtSettings.LongTimeFormat: = 'hh: mm: ss';
  UniGuiApplication.PFmtSettings.CurrencyString: = 'R $';

  • Like 1
Link to comment
Share on other sites

1 minute ago, Sherzod said:

Olá,

Qual idioma deve ser instalado no sistema?
Adicionei o Brasil português, mas não consegui reproduzir.

pt_br

 

First I gave a CTRL + F5,
then I typed 10/11 and gave a tab, it changed to 11/10/2020

test.jpg

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...