How to use @blueprintjs/timezone - 6 common examples

To help you get started, we’ve selected a few @blueprintjs/timezone 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 palantir / blueprint / packages / docs-app / src / examples / timezone-examples / timezonePickerExample.tsx View on Github external
public render() {
        const { timezone, targetDisplayFormat, disabled, showCustomTarget, showLocalTimezone } = this.state;

        const options = (
            <>
                <h5>Props</h5>
github palantir / blueprint / packages / docs-app / src / examples / timezone-examples / timezonePickerExample.tsx View on Github external
import { CustomTimezonePickerTarget } from "./components";

export interface ITimezonePickerExampleState {
    disabled: boolean;
    showCustomTarget: boolean;
    showLocalTimezone: boolean;
    targetDisplayFormat: TimezoneDisplayFormat;
    timezone: string;
}

export class TimezonePickerExample extends React.PureComponent {
    public state: ITimezonePickerExampleState = {
        disabled: false,
        showCustomTarget: false,
        showLocalTimezone: true,
        targetDisplayFormat: TimezoneDisplayFormat.COMPOSITE,
        timezone: "",
    };

    private handleDisabledChange = handleBooleanChange(disabled =&gt; this.setState({ disabled }));
    private handleShowLocalChange = handleBooleanChange(showLocalTimezone =&gt; this.setState({ showLocalTimezone }));
    private handleCustomChildChange = handleBooleanChange(showCustomTarget =&gt; this.setState({ showCustomTarget }));
    private handleFormatChange = handleStringChange((targetDisplayFormat: TimezoneDisplayFormat) =&gt;
        this.setState({ targetDisplayFormat }),
    );

    public render() {
        const { timezone, targetDisplayFormat, disabled, showCustomTarget, showLocalTimezone } = this.state;

        const options = (
            &lt;&gt;
                <h5>Props</h5>
github palantir / blueprint / packages / docs-app / src / examples / timezone-examples / components / customTimezoneTarget.tsx View on Github external
private getTooltipContent() {
        const { timezone } = this.props;

        if (timezone == null || timezone.length === 0) {
            return "No selection";
        }

        const { abbreviation, offsetAsString } = getTimezoneMetadata(timezone);

        return (
            <span>
                GMT {offsetAsString}
                <span style="{{">{abbreviation ? ` (${abbreviation})` : ""}</span>
            </span>
        );
    }
github palantir / blueprint / packages / docs-app / src / examples / timezone-examples / timezonePickerExample.tsx View on Github external
public render() {
        const { timezone, targetDisplayFormat, disabled, showCustomTarget, showLocalTimezone } = this.state;

        const options = (
            &lt;&gt;
                <h5>Props</h5>
github palantir / blueprint / packages / docs-app / src / examples / timezone-examples / timezonePickerExample.tsx View on Github external
public render() {
        const { timezone, targetDisplayFormat, disabled, showCustomTarget, showLocalTimezone } = this.state;

        const options = (
            &lt;&gt;
                <h5>Props</h5>
github palantir / blueprint / packages / docs-app / src / examples / timezone-examples / timezonePickerExample.tsx View on Github external
const { timezone, targetDisplayFormat, disabled, showCustomTarget, showLocalTimezone } = this.state;

        const options = (
            &lt;&gt;
                <h5>Props</h5>