This is documentation for the next version of Grafana. For the latest stable release, go to the latest version.

API Reference@grafana/dataisValidDate

isValidDate() function

isValidDate() function

isValidDate returns true if given string can be parsed into valid Date object, false otherwise

Signature

export declare function isValidDate(dateString: string): boolean;

Import

import { isValidDate } from '@grafana/data';

Parameters

Parameter Type Description
dateString string string representation of a date

Returns:

boolean