Difference between revisions of "Date field"

From Memento Database Wiki
Jump to: navigation, search
m
m
 
Line 1: Line 1:
{{Stamp|2018-09-27|4.5.5|1.1.0}}
+
{{Stamp|2021-04-07|4.10.0|1.9.6}}
 
A Date field may contain any date of the Gregorian calendar.
 
A Date field may contain any date of the Gregorian calendar.
  
Line 22: Line 22:
  
 
{{FieldDataValidationBase}}
 
{{FieldDataValidationBase}}
 +
{{FieldDataValidationDate}}
 +
{{FieldDataValidationWrap}}
  
 
== Display Options ==
 
== Display Options ==

Latest revision as of 11:32, 7 April 2021

« Page as of 2021-04-07, editions Mobile 4.10.0, Desktop 1.9.6 »

A Date field may contain any date of the Gregorian calendar.

When a Date field's value is used in a Calculation field, the value used is that used by Unix and Linux systems to represent dates. which is the number of seconds before or since January 1, 1970. When a Date field's value is used in a JavaScript field or in Memento scripts, the value used is based on that used by Unix and Linux systems to represent dates, but is in milliseconds (instead of seconds) before or since January 1, 1970.

This value allows date arithmetic to work readily, by merely doing integer arithmetic with the value.

When a date value is interpreted for import, export, or display in years, months, and days, the current locale is used. The format for import and export can be specified in program settings.

Name
Textual, case-insensitive field identifier that can include spaces; it's best to avoid characters that can be used as operators, though (standard across all field types)
Hint
Textual, case-insensitive field identifier that can include spaces

Advanced Parameters

Default Value
By default, there is no default value. Alternatively, the default may be set to the current date as of entry or edit of the field within an entry.

« NOTE: The Date formats parameter pertains only to the mobile edition. »


Date formats
The format may be specified explicitly. Selecting Date formats causes a card to appear in which these properties may be changed:
Language
The language/locale may be set.
Short date
The user may select among a number of choices for the short form of a date.
Long date
The user may select among a number of choices for the long form of a date.
Required 
Make entry of a value mandatory before saving an entry
Data validation
The value of a field may be validated against user-specified criteria. If the validation fails, an error message is displayed on the screen by the field, and the user must take action to resolve the situation before saving the entry.
After selecting Data Validation, a pop-up will appear for entering validation criteria. For Date & DateTime fields, the input will be deemed valid if:
Today
the date is today.
Yesterday
the date is yesterday.
This week
the date is some time last week.
This month
the date is some time this month.
Last week
the date is some time left week.
Last month
the date is some time last month.
Custom
the date falls between the two dates entered below.
Is empty
the field is empty.
Is not empty
the field is not empty.
This year
the date is some time this year.
If the checkbox is unchecked (default), a standard error message will be displayed when the input is invalid.
If the checkbox is checked, a custom error message will be displayed when the input is invalid.
If the Clear button is pressed, the criteria settings will be cleared.
If the Cancel button is pressed, the criteria settings will not be affected, and the criteria pop-up will be dismissed.
If the OK button is pressed, the input data will be accepted and displayed on the screen after the pop-up disappears.

Display Options

Display in the list as 
Select among the following roles for the current field:
  • As a Regular field
  • As an Entry Name
  • As an Entry Description
  • As an Entry Status
The field name
Display the name of the field in the card entry (By default, On). By this, it is meant that the field name will or will not be displayed on either the Entry View card or the Entry Edit card.
Font 
Choices are:
  • Family: Regular, Light, Condensed, Thin, Medium. By default, Regular.
  • Style: Normal, Bold, Italic, Bold Italic. By default, Normal.
  • Size: By default, 18. Direct entry to change.
  • Color: By default, White. Palette of 20 colors, backed up by a continuously variable color chooser.
Dependencies 
Ability to add one or more visibility dependencies upon fields with qualifying types.