How to use @blueprintjs/datetime - 10 common examples

To help you get started, we’ve selected a few @blueprintjs/datetime examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jauhararifin / ugrade / ui / src / scenes / Dashboard / Settings / ContestInfoForm / ContestInfoFormView.tsx View on Github external
onChange={handleChange}
        onBlur={handleBlur}
        value={values.gradingSize.toString()}
      />
    

    <div>
      
        
      
      
        </div>
github ia-toki / judgels / judgels-frontends / raphael / src / components / forms / FormTableDateInput / FormTableDateInput.tsx View on Github external
render() {
    const { props } = this;
    const { onChange, ...inputProps } = props.input;
    return (
      
        {formatDateTimezoneOffset(new Date())}}
          timePrecision={TimePrecision.MINUTE}
          canClearSelection={false}
          closeOnSelection={false}
          maxDate={new Date(4102444800000)}
          timePickerProps={{ showArrowButtons: true }}
          onChange={onChange}
          inputProps={{ name: inputProps.name }}
          {...inputProps}
        /&gt;
        
      
    );
  }
github Luiggi370z / react-todo / src / components / Todo / TodoForm / DateTimeInput / index.js View on Github external
const DateTimeInput = ({ date, isAllDay, onSelect }) =&gt; {
  const minDateTime = new Date()
  const formatDate = value =&gt;
    format(value, `MM/DD/YYYY${isAllDay ? '' : ' hh:mm a'}`)
  const timePrecision = isAllDay ? undefined : TimePrecision.MINUTE

  return (
    <div>
       new Date(str)}
        timePrecision={timePrecision}
        timePickerProps={{ useAmPm: true }}
        popoverProps={{ position: Position.TOP }}
        onChange={onSelect}
        value={date}</div>
github palantir / blueprint / packages / docs-app / src / examples / datetime-examples / common / precisionSelect.tsx View on Github external
export const PrecisionSelect: React.SFC = props =&gt; (
    <label>
        {props.label || "Precision"}
        
            {props.allowNone &amp;&amp; <option value="none">None</option>}
            <option value="{TimePrecision.MINUTE}">Minute</option>
            <option value="{TimePrecision.SECOND}">Second</option>
            <option value="{TimePrecision.MILLISECOND}">Millisecond</option>
        
    </label>
);
github palantir / blueprint / packages / docs-app / src / examples / datetime-examples / timePickerExample.tsx View on Github external
enum MinimumHours {
    NONE = 0,
    SIX_PM = 18,
}

enum MaximumHours {
    NONE = 0,
    SIX_PM = 18,
    NINE_PM = 21,
    TWO_AM = 2,
}

export class TimePickerExample extends React.PureComponent {
    public state = {
        disabled: false,
        precision: TimePrecision.MINUTE,
        selectAllOnFocus: false,
        showArrowButtons: false,
        useAmPm: false,
    };

    private handlePrecisionChange = handleStringChange((precision: TimePrecision) =&gt; this.setState({ precision }));

    public render() {
        return (
            
                
            
        );
    }

    protected renderOptions() {
github palantir / blueprint / packages / docs-app / src / examples / datetime-examples / dateRangeInputExample.tsx View on Github external
public render() {
        const { enableTimePicker, format, range, ...spreadProps } = this.state;
        const timePrecision = enableTimePicker ? TimePrecision.MINUTE : undefined;
        return (
            
                
                
            
        );
    }
github palantir / blueprint / packages / docs-app / src / examples / datetime-examples / common / precisionSelect.tsx View on Github external
export const PrecisionSelect: React.SFC = props =&gt; (
    <label>
        {props.label || "Precision"}
        
            {props.allowNone &amp;&amp; <option value="none">None</option>}
            <option value="{TimePrecision.MINUTE}">Minute</option>
            <option value="{TimePrecision.SECOND}">Second</option>
            <option value="{TimePrecision.MILLISECOND}">Millisecond</option>
        
    </label>
);
github palantir / blueprint / packages / docs-app / src / examples / datetime-examples / common / precisionSelect.tsx View on Github external
export const PrecisionSelect: React.SFC = props =&gt; (
    <label>
        {props.label || "Precision"}
        
            {props.allowNone &amp;&amp; <option value="none">None</option>}
            <option value="{TimePrecision.MINUTE}">Minute</option>
            <option value="{TimePrecision.SECOND}">Second</option>
            <option value="{TimePrecision.MILLISECOND}">Millisecond</option>
        
    </label>
);