Skip to content

Commit

Permalink
Merge pull request #203 from BoomTech-LLC/staging
Browse files Browse the repository at this point in the history
Staging-> main
  • Loading branch information
Tigran0199 authored Oct 29, 2024
2 parents e0d218c + 4fee159 commit 8c67866
Show file tree
Hide file tree
Showing 10 changed files with 185 additions and 91 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "boomform-builder",
"version": "2.5.6",
"version": "2.5.7",
"description": "Simple Form Builder",
"author": "BoomTechLLC",
"license": "MIT",
Expand Down Expand Up @@ -62,6 +62,7 @@
"axios": "^0.25.0",
"boomform": "^3.6.7",
"classnames": "^2.3.1",
"dayjs": "^1.11.13",
"react-google-recaptcha": "^2.1.0",
"react-grid-layout": "^1.4.2",
"react-quill": "^2.0.0",
Expand Down
16 changes: 13 additions & 3 deletions src/Body/Fields/Date/Date.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,26 @@
import React from 'react'
import { Input } from 'boomform'
import { iphoneCheck } from '../../../Helpers/global'
import dayjs from 'dayjs'

const Date = ({ validation = {}, payment, ...props }) => {
const { min, max } = validation
if (min || max) {
const { min, max, hideDays, disableDates, hiddenCustomDays, isCustom } =
validation
if (min || max || disableDates) {
validation = {
...validation,
custom: (value) => {
custom: value => {
if (value) {
const dayName = dayjs(value).format('dddd')
const customDay = dayjs(value).format('MMM D, YYYY')
if (min?.value > value) return min?.msg
if (max?.value < value) return max?.msg
if (disableDates && hideDays[dayName] && !isCustom) {
return `${dayName}s are disabled. Please pick another date. `
}
if (disableDates && hiddenCustomDays.includes(value) && isCustom) {
return `${customDay} is disabled. Please pick another date.`
}
}
return false
}
Expand Down
2 changes: 1 addition & 1 deletion src/Body/Fields/Email/Email.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { Fragment } from 'react'
import { Input } from 'boomform'

const Email = ({ label, classnameprefix, payment, ...props }) => {
return <Input {...props} type='email' />
return <Input {...props} type="email" name="email" autoComplete="email" />
}

export default Email
Loading

0 comments on commit 8c67866

Please sign in to comment.