selecting date with enter key not working when forceParse is false

Author: benjaminkomenCreated May 4, 2018Updated Aug 12, 2026

Expected behaviour

The date should be selected when pressing the ENTER key, regardless of the setting of forceParse.

Actual behaviour

The date is only selected when pressing ENTER, when forceParse is set to true (its default value).

Datepicker version used

1.8.0

Additional comment

On line 1455 in bootstrap-datepicker.js the code:

case 13: // enter
	if (!this.o.forceParse)
		break;

should be changed, because now it forces you to have forceParse to be true, to not break out of the case expression.

Source: uxsolutions/bootstrap-datepicker