@dvrd/dvr-controls 1.0.79 → 1.0.81

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dvrd/dvr-controls",
3
- "version": "1.0.79",
3
+ "version": "1.0.81",
4
4
  "description": "Custom web controls",
5
5
  "main": "index.ts",
6
6
  "files": [
@@ -31,7 +31,7 @@ interface Props {
31
31
  onChange: ChangeFunction<IDate>;
32
32
  closeOnChange?: boolean;
33
33
  value: IDate | null;
34
- label: string;
34
+ label?: string;
35
35
  timeMode?: DatePickerTimeMode;
36
36
  error?: ErrorType;
37
37
  className?: string;
@@ -111,7 +111,7 @@ function DvrdDatePicker(props: Props, ref: ForwardedRef<DVRDDatePickerRef>) {
111
111
  return (
112
112
  <div className={classNames('dvrd-date-picker', className, error && 'error', disabled && 'disabled')}>
113
113
  {!pickersOnly && <>
114
- <label className='field-label'>{label}</label>
114
+ {!!label && <label className='field-label'>{label}</label>}
115
115
  {renderMobilePicker()}
116
116
  <div className={classNames('value-container', useMobileNative && 'no-mob')} onClick={onClickContainer}>
117
117
  <label className={classNames('value', !value && 'placeholder')}>{value?.format(dateFormat) ??
@@ -531,6 +531,10 @@ function TimePicker(props: TimePickerProps) {
531
531
  )
532
532
  }
533
533
 
534
+ useEffect(() => {
535
+ if (value) internalValue.current = value;
536
+ }, [value]);
537
+
534
538
  return (
535
539
  <WithBackground active={open} onClose={onClose}>
536
540
  <div className='picker time'>