|
@@ -207,6 +207,10 @@ function Form(el, data, okCallback, cancelCallback) {
|
|
|
return placeholder;
|
|
|
},
|
|
|
string(key, value, handelInput) {
|
|
|
+ const dataTime = new Date(value);
|
|
|
+ if (dataTime.getDate())
|
|
|
+ return inputCreators.object(key, value, handelInput);
|
|
|
+
|
|
|
if (value === '*') {
|
|
|
return inputCreators.placeholder(
|
|
|
key,
|
|
@@ -411,6 +415,7 @@ function Form(el, data, okCallback, cancelCallback) {
|
|
|
const cachedFetchStarWars = async () => {
|
|
|
const lc = await localStorage.getItem('data');
|
|
|
if (lc) return JSON.parse(lc);
|
|
|
+
|
|
|
const data = await fetch('https://swapi.dev/api/people/1/')
|
|
|
.then((res) => res.json())
|
|
|
.then((data) => {
|