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

Format date columns when exporting #58

Closed
mgallegos opened this issue Jan 30, 2017 · 0 comments
Closed

Format date columns when exporting #58

mgallegos opened this issue Jan 30, 2017 · 0 comments
Assignees

Comments

@mgallegos
Copy link
Owner

mgallegos commented Jan 30, 2017

The following options will be added in the 'default_export_buttons_options':

  • srcDateFormat: source (database) date format (default value: Y-m-d)
  • newDateFormat: new date format (default value: m/d/Y)

Both options should be valid php date format.

These options can be override on any grid using the method:

setExportButtonsOption($option, $value)

If the the model options srcformat and newformat are set, these will replace (only on that column) the default options:

->addColumn(array('label' => 'date', 'index' => 'start_date', 'formatter' => 'date', 'formatoptions' => array('srcformat' => 'Y-m-d H:i:s', 'newformat' => 'd/m/Y h:i a')))
@mgallegos mgallegos self-assigned this Jan 30, 2017
mgallegos added a commit that referenced this issue Jan 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant