Skip to content

Datepicker: manual input on range mode don't allow single dates #7976

@msg-jstren

Description

@msg-jstren

Describe the bug

We're using the PrimeVue component Datepicker to select date ranges. In our case it should be possible to write the date manually or with the calender picker, depends on the user.

Now we found out that the manual input of a single date in range mode is not possible. By leaving the input field of the datepicker component, the input gets deleted. Neither the enter button nor the tab button navigation works. With the calender picker itself it is no problem just to select a single day and navigate forward with a saved day.

Used Settings for the datepicker:

  • dateFormat="dd.mm.yy"
  • selectionMode="range"
  • showIcon
  • iconDisplay="input"
  • showButtonBar

Pull Request Link

No response

Reason for not contributing a PR

  • Lack of time
  • Unsure how to implement the fix/feature
  • Difficulty understanding the codebase
  • Other

Other Reason

No response

Reproducer

https://stackblitz.com/edit/primevue-4-vite-issue-template-szh7mnsj?file=src%2FApp.vue

Environment

"dependencies": {
"@primevue/themes": "^4.3.3",
"@tailwindcss/vite": "^4.1.4",
"axios": "^1.8.4",
"dotenv": "^16.5.0",
"jszip": "^3.10.1",
"keycloak-js": "^26.2.0",
"primeicons": "^7.0.0",
"primevue": "^4.3.3",
"tailwindcss": "^4.1.4",
"vue": "^3.5.13",
"vue-router": "^4.5.0",
"zod": "^4.0.8"
},
"devDependencies": {
"@playwright/test": "^1.52.0",
"@types/keycloak-js": "^2.5.4",
"@types/node": "^22.15.19",
"@vitejs/plugin-vue": "^5.2.1",
"@vitest/coverage-v8": "^3.2.4",
"@vitest/eslint-plugin": "^1.1.42",
"@vitest/ui": "^3.2.4",
"@vue/eslint-config-prettier": "^10.2.0",
"@vue/eslint-config-typescript": "^14.5.0",
"@vue/test-utils": "^2.4.6",
"@vue/tsconfig": "^0.7.0",
"eslint": "^9.24.0",
"eslint-plugin-playwright": "^2.2.0",
"eslint-plugin-vue": "^10.0.0",
"jsdom": "^26.1.0",
"prettier": "^3.5.3",
"ts-node": "^10.9.2",
"typescript": "~5.7.2",
"vite": "^6.2.0",
"vite-plugin-vue-devtools": "^7.7.2",
"vitest": "^3.2.4",
"vue-tsc": "^2.2.4"
},
"optionalDependencies": {
"@rollup/rollup-linux-x64-gnu": "4.39.0"
}

Vue version

3.5.17

PrimeVue version

4.3.5

Node version

22.13.1

Browser(s)

Chrome

Steps to reproduce the behavior

  1. Click into the datepicker component input field (settings should be as in the description)
  2. Enter a single date, like 01.08.2025
  3. Navigate out of the datepicker component input field

Expected behavior

Should accept manual input with single dates in range mode.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: Needs TriageIssue will be reviewed by Core Team and a relevant label will be added as soon as possible

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions