Bug report #7451

Dates are not written in the table of attributes when using the calendar widget

Added by Giovanni Manghi almost 12 years ago. Updated over 11 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:-
Category:Vectors
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:invalid
Crashes QGIS or corrupts data:No Copied to github as #:16410

Description

subject says it all. Tested on master.

History

#1 Updated by Nathan Woodrow over 11 years ago

If there is no date format supplied the date will not be written back.

Should we close this or can you think of a better fix?

#2 Updated by Giovanni Manghi over 11 years ago

Nathan Woodrow wrote:

If there is no date format supplied the date will not be written back.

Should we close this or can you think of a better fix?

I see 4 problems:

I just tested and the date is not written (if using the calendar widget) even if the column is of type date or date/time. The columns were added via the "fields" tab in the vector properties

the types date and date/time are not available when creating a new shapefile from scratch (this I guess is a new bug)

if dates can be written only in a date column, then at least for shapes this is a change of behaviour since 1.8 (where the user was allowed to write dates into a text field) and should be at least very well documented

older projects that had a calendar widget applied to a text column will open as empty columns in QGIS 2.0

cheers!

#3 Updated by Nathan Woodrow over 11 years ago

Giovanni Manghi wrote:

if dates can be written only in a date column, then at least for shapes this is a change of behaviour since 1.8 (where the user was allowed to write dates into a text field) and should be at least very well documented

This is still the case. You can still write dates to string columns you just have to supply the format of the date string.

#4 Updated by Giovanni Manghi over 11 years ago

You can still write dates to string columns you just have to supply the format of the date string.

but not with the calendar widget, correct?

#5 Updated by Nathan Woodrow over 11 years ago

Giovanni Manghi wrote:

You can still write dates to string columns you just have to supply the format of the date string.

but not with the calendar widget, correct?

Yeah does for me

#6 Updated by Giovanni Manghi over 11 years ago

Yeah does for me

odd, does not for me at the moment on Linux on both date and text fields. There was a recent fix?

#7 Updated by Giovanni Manghi over 11 years ago

Nathan Woodrow wrote:

Giovanni Manghi wrote:

You can still write dates to string columns you just have to supply the format of the date string.

but not with the calendar widget, correct?

Yeah does for me

just tested on windows/osgeo4w/master and no date is written in a "date" column nor in a "string" one using the calendar widget.

#8 Updated by Giovanni Manghi over 11 years ago

  • Resolution set to invalid
  • Status changed from Open to Closed

Now I see,

the "date format" parameter is mandatory, without it then the widget does not work as does not use any default format...

are the possible formats documented in the master manual? Can we add a few examples in the widget dialog? there is plenty of space.

Also available in: Atom PDF