This repository was archived by the owner on Dec 25, 2024. It is now read-only.
File tree 1 file changed +2
-4
lines changed
docs/src/components/samples
1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change 1
1
import React , { useEffect } from 'react' ;
2
2
import { FormalTheme , SamplesSectionWrapper , SamplesTitle } from './styled' ;
3
3
import dynamic from 'next/dynamic' ;
4
- // eslint-disable-next-line no-duplicate-imports
5
- // import {JBDateInputValueObject } from 'jb-date-input-react';
6
- // import {InputTypes as JBDateInputInputTypes} from 'jb-date-input/dist/web-component/jb-date-input/lib/Types';
4
+ import { JBDateInputValueObject } from 'jb-date-input-react' ;
7
5
enum InputTypes {
8
6
jalali = 'JALALI' ,
9
7
gregorian = 'GREGORIAN'
@@ -17,7 +15,7 @@ const validationList = [
17
15
message : 'تاریخ باید تنها در قرن 13 شمسی باشد'
18
16
} ,
19
17
{
20
- validator : ( inputedText : string , valueObject : any , valueText : string ) => {
18
+ validator : ( inputedText : string , valueObject : JBDateInputValueObject , valueText : string ) => {
21
19
//you can use raw inputed text or formatted text in expected value in argumants
22
20
//you have access to both jalali and gregorian date object here in valueObject
23
21
// remember valueObject and valueText are both empty and null when date is incomplete
You can’t perform that action at this time.
0 commit comments