You've already forked lazarus-ccr
fpspreadsheet: Fix TsWorksheet not being able to change a time cell value (see https://forum.lazarus.freepascal.org/index.php/topic,42130.msg293480)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6569 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -5208,15 +5208,15 @@ begin
|
||||
// "1" as a valid date/time.
|
||||
if TryStrToDateTime(AValue, number, AFormatSettings) then
|
||||
begin
|
||||
if number < 1.0 then // this is a time alone
|
||||
begin
|
||||
if not IsTimeFormat(numFmtParams) then
|
||||
if (number < 1.0) or IsTimeFormat(numFmtParams) then // this is a time alone
|
||||
begin
|
||||
// if not IsTimeFormat(numFmtParams) then
|
||||
// begin
|
||||
ucValue := Uppercase(AValue);
|
||||
isAMPM := (pos('AM', ucValue) > 0) or (pos('PM', ucValue) > 0);
|
||||
isLongTime := IsLongTimeFormat(AValue, AFormatSettings.TimeSeparator);
|
||||
WriteDateTime(ACell, number, TIME_FMT[isAMPM, isLongTime]);
|
||||
end;
|
||||
// end;
|
||||
end else
|
||||
if frac(number) = 0.0 then // this is a date alone
|
||||
begin
|
||||
|
Reference in New Issue
Block a user