# Conflicts: # src/constants/ActionConstants.tsx # src/constants/WidgetConstants.tsx # src/editorComponents/CheckboxComponent.tsx # src/editorComponents/RadioGroupComponent.tsx # src/mockResponses/WidgetCardsPaneResponse.tsx # src/pages/Editor/Canvas.tsx # src/pages/Editor/EditorDragLayer.tsx # src/reducers/entityReducers/index.tsx # src/reducers/index.tsx # src/utils/WidgetRegistry.tsx # src/widgets/BaseWidget.tsx # src/widgets/BreadcrumbsWidget.tsx # src/widgets/ButtonWidget.tsx # src/widgets/CalloutWidget.tsx # src/widgets/CheckboxWidget.tsx # src/widgets/IconWidget.tsx # src/widgets/InputGroupWidget.tsx # src/widgets/NumericInputWidget.tsx # src/widgets/RadioGroupWidget.tsx # src/widgets/TagInputWidget.tsx # src/widgets/TextWidget.tsx
29 lines
833 B
TypeScript
29 lines
833 B
TypeScript
import React from "react";
|
|
import BaseWidget, { WidgetProps, WidgetState } from "./BaseWidget";
|
|
import { WidgetType } from "../constants/WidgetConstants";
|
|
import { Moment } from "moment";
|
|
|
|
class DatePickerWidget extends BaseWidget<DatePickerWidgetProps, WidgetState> {
|
|
getPageView() {
|
|
return <div />;
|
|
}
|
|
|
|
getWidgetType(): WidgetType {
|
|
return "DATE_PICKER_WIDGET";
|
|
}
|
|
}
|
|
|
|
//Taken from https://blueprintjs.com/docs/#timezone/timezone-picker, needs to be completed with entire list
|
|
export type TimeZone = "Asia/Kolkata" | "Pacific/Midway";
|
|
export type DatePickerType = "DATE_PICKER" | "DATE_RANGE_PICKER";
|
|
|
|
export interface DatePickerWidgetProps extends WidgetProps {
|
|
defaultDate?: Date;
|
|
timezone?: TimeZone;
|
|
enableTime: boolean;
|
|
label: string;
|
|
datePickerType: DatePickerType;
|
|
}
|
|
|
|
export default DatePickerWidget;
|