Jump to content

UniDateTimePicker editor


artem_niko

Recommended Posts

8 hours ago, Abaksoft said:

Hello!

I was using first link from you answer and write that:

procedure TUniServerModule.UniGUIServerModuleCreate(Sender: TObject);
begin
// Change application global format settings
  PFmtSettings.CurrencyFormat:=0;
  PFmtSettings.CurrencyString:='€';
  PFmtSettings.DateSeparator:='.';
  PFmtSettings.ShortDateFormat:='dd.mm.yyyy';

  PFmtSettings.ShortTimeFormat:='hh:mm:ss';
  PFmtSettings.TimeSeparator:=':';
end;

But this is not working...

After select time and pressing button "Save", in RowEditor, I get error.

Link to comment
Share on other sites

3 hours ago, Артем said:

Hello!

I was using first link from you answer and write that:


procedure TUniServerModule.UniGUIServerModuleCreate(Sender: TObject);
begin
// Change application global format settings
  PFmtSettings.CurrencyFormat:=0;
  PFmtSettings.CurrencyString:='€';
  PFmtSettings.DateSeparator:='.';
  PFmtSettings.ShortDateFormat:='dd.mm.yyyy';

  PFmtSettings.ShortTimeFormat:='hh:mm:ss';
  PFmtSettings.TimeSeparator:=':';
end;

But this is not working...

After select time and pressing button "Save", in RowEditor, I get error.

The same error ?

What say the log (file on your application)

Link to comment
Share on other sites

3 minutes ago, Abaksoft said:

 

on Your btnSave onPost event put anything like :

begin

  Showmessage('Hello');

end;

to see if the problem comes from roweditor or sql.

 

Or better :

 

begin

  Showmessage(MyDataSet.FieldByName('MyFielDateTime').AsString);

end;

 

Link to comment
Share on other sites

5 minutes ago, Abaksoft said:

 

Or better :

 

begin

  Showmessage(MyDataSet.FieldByName('MyFielDateTime').AsString);

end;

 

I use the "Save" and "Cancel" buttons, which are used to save when using RowEditor in UniDBGrid.
However, I put the code with the message here:

procedure TUniFormWorkingTimeForGroup.FDQueryTimesAfterPost (DataSet: TDataSet);
begin
ShowMessageN (FDQueryTimes.FieldByName ('WorkTime'). AsString);
end;

And I did not receive this message, because at first I got an error in the browser about the wrong format: "'01 .01.2008 2:30:00 'is not a valid time.", But ShowMessageN did not appear.

Link to comment
Share on other sites

4 minutes ago, Abaksoft said:

i think this problem hapened on an previous release and fixed, if i remember.

try do download the last : Unigui 1521

I would like @Sherzod to confirm that this error was fixed in version 1521. I downloaded it, but I’m using 1521 so far and don’t want to waste time reinstalling the version on 1521 if it has such an error. I would like to hear a comment from developers and support too.
Do you have a test case with UniDateTimePicker settings? May accidentally be in stock. And then I used scripts too and maybe they conflict with what is written in OnCreate UniServerModule.

Link to comment
Share on other sites

29 minutes ago, Abaksoft said:

Hello ApTeM,

Here is a simple testcase  (No problem on 1519). 

Try it.

DateTime_RowEditor.zip

Thank you for example, but you testcase not help me because you are using ClientDataSet - I'm using FireDAC, you creating field RunTime - I have now created field with time (TIME, Firebird). You are not using UnIDateTImePicker for edit time value.

Link to comment
Share on other sites

 

10 minutes ago, Артем said:

Thank you for example, but you testcase not help me because you are using ClientDataSet - I'm using FireDAC, you creating field RunTime - I have now created field with time (TIME, Firebird). You are not using UnIDateTImePicker for edit time value.

OK.

Can you complete my testCase with :

- UniDateTimePicker

- Time field

and let me know...

Link to comment
Share on other sites

1 hour ago, Abaksoft said:

 

OK.

Can you complete my testCase with :

- UniDateTimePicker

- Time field

and let me know...

Sorry, I'm not admin in server and can't create test Firebird database, using FireDAC.

May be, possible get new value of time before post into table? For example, in event UnIDateTimePicker1.OnChange and then post new value when pressing button "Save" in RowEditor.

Link to comment
Share on other sites

Look, I add UniDateTimePicker in you test case.

When I make double click in UniDBGrid1 and using RowEditor, new value of time adding with '01.01.2008'.

So, this is value ('01.01.2008') don't must adding. Only time must be insert. 

I get the same error. Because when you change the value of time, an extra value is added - the year.

DateTime_RowEditor_with_UniDateTimePicker.zip

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...