@bravobit/bb-foundation 0.57.5 → 0.57.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2208,15 +2208,18 @@ class BbDatePicker {
2208
2208
  // Push the years.
2209
2209
  return this.years$.next(years);
2210
2210
  }
2211
- formToDateString = data => {
2211
+ formToDateString(data) {
2212
2212
  if (this.form?.invalid) {
2213
2213
  return null;
2214
2214
  }
2215
+ if (data === null || data === undefined) {
2216
+ return null;
2217
+ }
2215
2218
  const { year, month, day } = data;
2216
2219
  const prefixedMonth = this.padString(`${month}`, 2, '0');
2217
2220
  const prefixedDay = this.padString(`${day}`, 2, '0');
2218
2221
  return [year, prefixedMonth, prefixedDay].join('-');
2219
- };
2222
+ }
2220
2223
  parseYearFormat = (value) => {
2221
2224
  // Transform the value to a definitive string.
2222
2225
  const yearString = `${value}`;