Broaden date field detection — match any label containing 'date'

Catches 'Date of Application', 'Available Start Date', and other
date fields that expect mm/dd/yyyy format.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-06 15:04:10 -08:00
parent fdb0224226
commit 7d81d59cb5

View File

@@ -198,8 +198,8 @@ export class FormFiller {
if (l.includes('salary') || l.includes('compensation') || l.includes('expected pay')) return String(p.desired_salary || '');
if (l.includes('minimum') && l.includes('salary')) return String(Math.round((p.desired_salary || DEFAULT_DESIRED_SALARY) * MINIMUM_SALARY_FACTOR));
// Dates — some fields expect mm/dd/yyyy format, others accept text
if (l.includes('start date') || l.includes('when can you start') || l.includes('available to start') || l.includes('earliest date') || l.includes('date available')) {
// Dates — mm/dd/yyyy format for date fields
if (l.includes('start date') || l.includes('when can you start') || l.includes('available to start') || l.includes('earliest date') || l.includes('date available') || l.includes('date of application') || (l.includes('date') && !l.includes('update'))) {
const now = new Date();
const mm = String(now.getMonth() + 1).padStart(2, '0');
const dd = String(now.getDate()).padStart(2, '0');