diff --git a/src/assets/css/common.css b/src/assets/css/common.css index 1d5c975c..759e0ccf 100644 --- a/src/assets/css/common.css +++ b/src/assets/css/common.css @@ -355,6 +355,7 @@ header.vff-header svg.f-logo { .vff input[type=email], .vff input[type=url], .vff input[type=password], +.vff input[type=date], .vff textarea { -webkit-appearance: none; -moz-appearance: none; @@ -384,6 +385,7 @@ header.vff-header svg.f-logo { .vff .f-full-width input[type=email], .vff .f-full-width input[type=url], .vff .f-full-width input[type=password], +.vff .f-full-width input[type=date], .vff .f-full-width textarea, .vff .f-full-width span.faux-form{ width: 100%; @@ -437,6 +439,27 @@ header.vff-header svg.f-logo { height: auto; } +/* ios datepicker */ +.vff.vff-is-ios .field-datetype:not(.f-has-value) .f-answer > span { + position: relative; + top: 0; + left: 0; +} + +.vff.vff-is-ios .field-datetype:not(.f-has-value) .f-answer > span::before { + position: absolute; + content: attr(data-placeholder); + display: block; + pointer-events: none; + padding: 0.12em .2em; +} + +.vff.vff-is-ios input[type=date] { + height: 32px; + display: block; +} + + /* links */ @@ -825,6 +848,7 @@ header.vff-header svg.f-logo { .vff input[type=email], .vff input[type=url], .vff input[type=password], + .vff input[type=date], .vff textarea{ font-size: .78em; } @@ -870,6 +894,7 @@ header.vff-header svg.f-logo { .vff input[type=email], .vff input[type=url], .vff input[type=password], + .vff input[type=date], .vff textarea { line-height: 1.4; padding: .16em .2em; diff --git a/src/assets/css/themes/theme-green.css b/src/assets/css/themes/theme-green.css index 7ffcc936..5e170943 100644 --- a/src/assets/css/themes/theme-green.css +++ b/src/assets/css/themes/theme-green.css @@ -69,6 +69,7 @@ header.vff-header svg.f-logo { .vff input[type=email], .vff input[type=url], .vff input[type=password], +.vff input[type=date], .vff textarea, .vff span.faux-form { border-bottom-color: var(--vff-secondary-text-color); @@ -104,6 +105,14 @@ header.vff-header svg.f-logo { font-weight: 300; } + +/*faux input type date placeholder for iOS*/ +.vff.vff-is-ios .field-datetype:not(.f-has-value) .f-answer > span::before{ + color: var(--vff-secondary-text-color); + font-weight: 300; + font-size: .72em; +} + /*field-multiplechoicetype*/ .vff ul.f-radios li { border: 1px solid var(--vff-secondary-text-color); diff --git a/src/assets/css/themes/theme-minimal.css b/src/assets/css/themes/theme-minimal.css index 3ad22cd1..c2c79d93 100644 --- a/src/assets/css/themes/theme-minimal.css +++ b/src/assets/css/themes/theme-minimal.css @@ -57,6 +57,7 @@ header.vff-header svg.f-logo{ .vff input[type=email], .vff input[type=url], .vff input[type=password], +.vff input[type=date], .vff textarea, .vff span.faux-form { border-bottom-color: var(--vff-secondary-text-color); @@ -98,6 +99,13 @@ header.vff-header svg.f-logo{ font-weight: 300; } +/*faux input type date placeholder for iOS*/ +.vff.vff-is-ios .field-datetype:not(.f-has-value) .f-answer > span::before{ + color: var(--vff-secondary-text-color); + font-weight: 300; + font-size: .72em; +} + /*field-multiplechoicetype*/ .vff ul.f-radios li { border: 1px solid var(--vff-secondary-text-color); diff --git a/src/assets/css/themes/theme-purple.css b/src/assets/css/themes/theme-purple.css index 26969929..6960d096 100644 --- a/src/assets/css/themes/theme-purple.css +++ b/src/assets/css/themes/theme-purple.css @@ -73,6 +73,7 @@ header.vff-header svg.f-logo{ .vff input[type=email], .vff input[type=url], .vff input[type=password], +.vff input[type=date], .vff textarea, .vff span.faux-form { border-bottom-color: var(--vff-secondary-text-color); @@ -114,6 +115,13 @@ header.vff-header svg.f-logo{ font-weight: 300; } +/*faux input type date placeholder for iOS*/ +.vff.vff-is-ios .field-datetype:not(.f-has-value) .f-answer > span::before{ + color: var(--vff-secondary-text-color); + font-weight: 300; + font-size: .72em; +} + /*field-multiplechoicetype*/ .vff ul.f-radios li { border: 1px solid var(--vff-secondary-form-bg-color); diff --git a/src/components/FlowForm.vue b/src/components/FlowForm.vue index 83cc99c0..8e857c98 100644 --- a/src/components/FlowForm.vue +++ b/src/components/FlowForm.vue @@ -1,7 +1,7 @@ // Form template and logic