Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
  • Lazarus Lazarus
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 2,095
    • Issues 2,095
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 8
    • Merge requests 8
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • Code review
    • Insights
    • Issue
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • FPC
  • Lazarus
  • LazarusLazarus
  • Issues
  • #27454
Closed
Open
Created Feb 12, 2015 by FPC Admin account@fpc_adminOwner

TDateEdit can't read own date when formatted to give eg 02-feb-2014

Original Reporter info from Mantis: MWaal
  • Reporter name: Maarten van der Waal

Description:

Having on my system the shortdateformat as dd-MMM-yyyy, the first click on the icon right-of the TDateEdit shows the (correct) date as (eg.) 12-feb-2015. Then clicking again on the icon brings an 'EConvertError' with message "12-feb-2015" is not a valid date format.

Steps to reproduce:

Make the system shortdateformat dd-MMM-yyyy (dd-MMM-jjjj for Dutch)
Open a new project, add a TDateEdit to the form and run. Click to get a date and click again to get the error. Here, the calender should be shown again.

Additional information:

Probably the error is caused by:

function StrToDate(const S: AnsiString): TDateTime;
begin
    result := StrToDate(@S[1],Length(s),DefaultFormatSettings.ShortDateFormat,#0);
end; 
which is found in dati.inc,
Where the DefaultFormatSettings (as defined in sysinth.inc) has a fixed definition.

Mantis conversion info:

  • Mantis ID: 27454
  • OS: Windows
  • OS Build: 7
  • Build: 46529
  • Platform: -
  • Version: 1.2.6
  • Fixed in revision: r47782 (#227f8625)
  • Target version: 1.4
Assignee
Assign to
Time tracking