Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
correctly convert date/time format to respect field and display formats #421
these formats are defined in QGIS and can differ from each other
by correctly constructing a date/time object when getting/setting the value from
@3nids everything looks fine upon data entry. The data are however not saved. When I revisit a feature that I already entered before I can't see the entered time. AND when I try to modify the time it will not accept my entries (field remains empty). The only time that is accepted and written to the geopackage file is when it is entered via a now()-default-value.
Here is a new version that should work.
There is one case I fail to solve easily or properly, when using a shapefile, which has date type only.
QGIS passes a QDate object which is translated to a JS Date object, which has no distinction for dates only.
This issue doesn't occur with gpkg as field has a date/time type.
@saemiw could you give another try at this one?
Jan 29, 2019
1 check passed
my collegue suggest also one more change (maybe also in another step/together with the shapefile issue-fix): When you enter non-sense like 30:00:00 in a hh:mm:ss-field QField does show these numbers in grey (instead of black) and then doesn't save them when you save the feature. I would be better when an non-sense entry like 30:00:00 would immediately disappear after pushing the o.k. button instead of showing the wrong entry in grey. Like this it would be more obvious to the fieldworker that these data will not be saved.