Skip to content

Commit

Permalink
Support open date spans (fixes #555)
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidMStraub committed Dec 28, 2024
1 parent 3d3e9e5 commit 3966ac5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/components/GrampsjsFormSelectDate.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ import {GrampsjsTranslateMixin} from '../mixins/GrampsjsTranslateMixin.js'

const modifiers = {
0: 'Regular',
1: 'Before',
2: 'After',
3: 'About',
1: 'before',
2: 'after',
3: 'about',
4: 'Range',
5: 'Span',
// 6: 'Text only'
7: 'from',
8: 'to',
}

const qualifiers = {
Expand Down Expand Up @@ -265,7 +267,7 @@ class GrampsjsFormSelectDate extends GrampsjsTranslateMixin(LitElement) {
}

_hasSecondDate() {
return this.data?.modifier >= 4
return this.data?.modifier === 4 || this.data?.modifier === 5
}

reset() {
Expand Down
5 changes: 5 additions & 0 deletions src/strings.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export const grampsStrings = [
'_Save',
'Abbreviation',
'Abort changes?',
'about',
'About',
'Above the name',
'Add a new event',
Expand All @@ -91,6 +92,7 @@ export const grampsStrings = [
'Adopted people',
'Adopted',
'Adult Christening',
'after',
'After',
'Age at death',
'Age',
Expand All @@ -115,6 +117,7 @@ export const grampsStrings = [
'Baptism',
'Bar Mitzvah',
'Bas Mitzvah',
'before',
'Before',
'between',
'Birth Date',
Expand Down Expand Up @@ -266,6 +269,7 @@ export const grampsStrings = [
'Filter',
'First Communion',
'Foster',
'from',
'FTP',
'full circle',
'Full Name',
Expand Down Expand Up @@ -570,6 +574,7 @@ export const grampsStrings = [
'Timeline',
'Title',
'To Do',
'to',
'Tombstone',
'Top Left',
'Top paper margin',
Expand Down

0 comments on commit 3966ac5

Please sign in to comment.