Skip to content

Commit f6222cd

Browse files
committed
field style added to date
1 parent e9b5142 commit f6222cd

File tree

1 file changed

+11
-2
lines changed
  • client/packages/lowcoder/src/comps/comps/dateComp

1 file changed

+11
-2
lines changed

client/packages/lowcoder/src/comps/comps/dateComp/dateComp.tsx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { UICompBuilder, withDefault } from "../../generators";
2020
import { CommonNameConfig, depsConfig, withExposingConfigs } from "../../generators/withExposing";
2121
import { formDataChildren, FormDataPropertyView } from "../formComp/formDataConstants";
2222
import { styleControl } from "comps/controls/styleControl";
23-
import { DateTimeStyle, DateTimeStyleType, LabelStyle } from "comps/controls/styleControlConstants";
23+
import { ComponentStyle, DateTimeStyle, DateTimeStyleType, LabelStyle } from "comps/controls/styleControlConstants";
2424
import { withMethodExposing } from "../../generators/withMethodExposing";
2525
import {
2626
disabledPropertyView,
@@ -76,6 +76,7 @@ const commonChildren = {
7676
suffixIcon: withDefault(IconControl, "/icon:regular/calendar"),
7777
...validationChildren,
7878
viewRef: RefControl<CommonPickerMethods>,
79+
field:styleControl(ComponentStyle)
7980
};
8081
type CommonChildrenType = RecordConstructorToComp<typeof commonChildren>;
8182

@@ -166,7 +167,8 @@ export const datePickerControl = new UICompBuilder(childrenMap, (props) => {
166167
return props.label({
167168
required: props.required,
168169
style: props.style,
169-
labelStyle:props.labelStyle,
170+
labelStyle: props.labelStyle,
171+
field:props.field,
170172
children: (
171173
<DateUIView
172174
viewRef={props.viewRef}
@@ -253,6 +255,9 @@ export const datePickerControl = new UICompBuilder(childrenMap, (props) => {
253255
<Section name={sectionNames.labelStyle}>
254256
{children.labelStyle.getPropertyView()}
255257
</Section>
258+
<Section name={sectionNames.field}>
259+
{children.field.getPropertyView()}
260+
</Section>
256261
</>
257262
)}
258263
</>
@@ -319,6 +324,7 @@ export const dateRangeControl = (function () {
319324
style: props.style,
320325
labelStyle:props.labelStyle,
321326
children: children,
327+
field:props.field,
322328
...(startResult.validateStatus !== "success"
323329
? startResult
324330
: endResult.validateStatus !== "success"
@@ -383,6 +389,9 @@ export const dateRangeControl = (function () {
383389
<Section name={sectionNames.labelStyle}>
384390
{children.labelStyle.getPropertyView()}
385391
</Section>
392+
<Section name={sectionNames.field}>
393+
{children.field.getPropertyView()}
394+
</Section>
386395
</>
387396
)}
388397

0 commit comments

Comments
 (0)