How to use the baseui/datepicker.formatDate function in baseui

To help you get started, we’ve selected a few baseui 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 uber / baseweb / documentation-site / examples / datepicker / composed-range-pickers.js View on Github external
function formatDateAtIndex(
  dates: ?Date | ?Array,
  index: number,
) {
  if (!dates || !Array.isArray(dates)) return '';
  const date = dates[index];
  if (!date) return '';
  return formatDate(date, 'yyyy/MM/dd');
}
github uber / baseweb / documentation-site / examples / datepicker / composed-range-pickers.tsx View on Github external
function formatDateAtIndex(
  dates: Date | Array,
  index: number,
) {
  if (!dates || !Array.isArray(dates)) return '';
  const date = dates[index];
  if (!date) return '';
  return formatDate(date, 'yyyy/MM/dd') as string;
}