Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 294805

Datetime module needs a view field plugin for its field types

$
0
0

Currently, the datetime module does not define any views/field plugins with @ViewsField(...) tag in them.

There are already plugins for argument, filter and sort.

Views field is useful when writing custom modules that use the Datetime module.

One example is importing a custom base table by implementing a hook_views_data()`. When the table contains a SQL date field, formatted as YYYY-MM-DD, using a datetime views field plugin would be very useful.

The workaround for the case described above is to add a calculable field in SQL query which converts that date field to a unix timestamp field, and using the standard date field handler available in Drupal core.


Viewing all articles
Browse latest Browse all 294805

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>