archibalduk / Eastside-Hockey-Manager-Editor

A database and saved game editor for Eastside Hockey Manager. Visit https://www.ehmtheblueline.com/editor for more details.
GNU Lesser General Public License v3.0
2 stars 0 forks source link

Possible bug when filtering by contract expiry date #77

Open archibalduk opened 4 months ago

archibalduk commented 4 months ago

image

image

archibalduk commented 3 days ago

This is a widespread issue and is caused by the models' data() function returning a string rather than a number or date. For example:

case ContractExpiresClub:
            return i->ContractExpiresClub.getString();

The above should be corrected to:

case ContractExpiresClub:
            return i->ContractExpiresClub.get();

This then returns a date (which can be filtered) rather than a string (which cannot). The difficulty with the fix is that it impacts all date fields within the Editor as they appear as yyyy-mm-dd rather than the locale-specific format. This might also impact some spreadsheet exports.