Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calendar in grid widget doesn't save #95

Open
shannah opened this issue Feb 27, 2018 · 2 comments
Open

Calendar in grid widget doesn't save #95

shannah opened this issue Feb 27, 2018 · 2 comments

Comments

@shannah
Copy link
Owner

shannah commented Feb 27, 2018

Using calendar on grid widget over a relationship with a table that has a mysql date field (calendar widget on fields.ini) produces empty result on saving. All the other fields save ok but date appears empty. I use these parameters:
On parent table fields.ini

[expirations]
    transient = 1

	widget:label = "Expirations"
	widget:description = ""

    widget:type = grid
    relationship = expirations
    widget:columns = "date, amount, status"

On child table fields.ini

[date]
	visibility:browse = visible
	visibility:list=visible
	visibility:find = visible
	visibility:csv = visible

	widget:label = "Fecha"
	widget:description = ""

	widget:type = calendar
	widget:dateFormat = "dd/mm/yyyy"
	widget:firstDay = 1
	date_format = "%d-%m-%Y"
	widget:ifFormat = "%d-%m-%Y"

Using directly CRUD on table all works fine.

From https://groups.google.com/d/msgid/xataface/cbe09c95-2d7f-45b1-8c88-e566bf04be56%40googlegroups.com?utm_medium=email&utm_source=footer

@carmaz79
Copy link

carmaz79 commented Aug 1, 2018

It only occurs when field is in metafields:order on relationship
metafields:order = date
On IO.php
$trec->setValues($tval_existing[$tid]);
echo "Saving ";prearray($trec->vals());
if ( $orderCol ) $trec->setValue( $orderCol, $tval_existing[$tid]['order']);
echo "After ";prearray($trec->vals());
On saving all is okay.
On After value loss
Really is logic than metafield:orders can not be a date because this field must be a number.
I propose to close this issue.

@shannah
Copy link
Owner Author

shannah commented Aug 1, 2018

Thanks. Yes. That is the reason. I'm going to leave this open for now to remind me that I need to either improve the documentation so that users don't make this mistake, or improve the error messages to make it easier to track down - or both.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants