Install

Works with Drupal: 7.x

Using Composer to manage Drupal site dependencies

Downloads

Download partial_date-7.x-1.0-beta1.tar.gztar.gz 34.94 KB
MD5: dca8ae7326ccc55e64294a3b1e736033
SHA-1: dab5c2213b15e7c220aa616040bd9ce8cff2e5a5
SHA-256: 1a22b82bc887717d8b0798de67d9001edc66f83f14ea1acb3320d54587e190a2
Download partial_date-7.x-1.0-beta1.zipzip 38.97 KB
MD5: 9eeffc7ca6a9eaad9878448ef4f3c8bc
SHA-1: ccb1e74a8cc7a22a5fcf0a67e9146b486da8bc1b
SHA-256: 8a97c24a0f9691c2cda11241c0e149cf12eb2e4994496f75e5acc2cc2a799a98

Release notes

This release has a number of bug fixes and enhancements.

Limited field validation is now enforced.

1) If the field is marked as required, then you will get a validation error if there are no items with any values

#1536344: The required option doesn't work

2) Minimum component mix has been added. This allows you to select what components are required to make a partial date valid. For example, you can specify that the From and To years are required. During validation, a field that is not empty is then checked against these.

#1536348: Allow individual date parts to be required

An approximate component has been added

This adds a checkbox (if enabled) that allows users to mark the date as approximate.

A corresponding formatter option has been added that only shows if the date is flagged as approximate. This is applied to both from and to dates in the case of ranged date fields.

Inline ranged theming is now optional
This required overriding the core theme_form_element() [only for this widget], and rendering the date components in this. This is a configurable setting in the instance settings.

#1353400: Provide inline option for date widgets

Remove checkbox is now optional
You can now hide this easily via the instance settings. However, if you have multiple date fields, removing this makes it difficult to remove date fields. Every component needs to be manually cleared before the form is saved to remove these.

#1536330: Allow turning off the 'Remove date' checkbox

Help text
Custom help text can be inserted into the description fields under the date, under the approximate checkbox, the remove checkbox and both text description fields. (Not I18n aware)

A custom timestamp is being using based on year 0
Well, midnight between -1BC to 1AD, there was no year 0.

This will effect the ordering of alpha version and data saved using the beta versions if ordering by the timestamp column. This is only used for sorting, so re-save any existing to update these fields.

This is a float that has the following range values: [+/-][year][00-12][00-32][00-24][00-60][00-60].00

So 20001200086000 is year 2000, Dec (12), Unknown date (00), 8am (08), 59min (60), unknown seconds (00). Note that 00 means unknown, so 1 sec after midnight is stored as: 1 hour, 1 min and 1 second is actually saved as 01:01:02 or "10102".

Why you ask? This provides a sortable column in the database for complete AND incomplete dates .

Formatters should be more tolerant
If there is no hour, the meridiem is set to an empty string, same for the year designation and approximation fields.

And the custom formatter settings should no longer be overridden.

#1651586: Formatter will always used previously saved custom date format settings (and maybe #1342766: Fix usage and display of the timezones, I couldn't replicate after this patch, didn't test before this patch)

Also:
#1680114: Duplicate quote character in partial-date-remove div HTML tag

Created by: Alan D.
Created on: 18 Jul 2012 at 08:09 UTC
Last updated: 18 Jul 2012 at 08:11 UTC
New features
Bug fixes

Other releases