-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Open
Description
- Framework7 version: 9.0.3
- Platform and Target: Chrome Browser, PWA/WebApp in iOS style mode
Describe the bug
The dateFormat property set on an individually created calendar component gets ignored if a "default" is set on the app instance. According to the docs, defaults can be specified for all components via setting them on the app instance. However, in this case setting the app "default" discards any individually set property value for dateFormat.
To Reproduce
Steps to reproduce the behavior:
- Create a calendar component (see code below)
- Specify a
dateFormatdefault via app.js (see below) - Define a
dateFormatfor the calendar instance itself directly (see below) - See how the app "default" overrides the locally defined value
Expected behavior
The value provided to dateFormat on the app instance should provide a default in case no individual value is assigned on the calendar instance. If the value itself is set, it should NOT overwrite it.
Actual Behavior
The app instance property value overrides the individual setting, discarding the purpose of a "default".
Additional context
On a router component / page:
const dateInput = $f7.calendar.create({
inputEl: '#input',
dateFormat: {
weekday: 'short',
year: 'numeric',
month: 'long',
day: '2-digit',
hour: '2-digit',
minute: '2-digit'
}
});In app.js:
const app = new Framework7({
...
calendar: { dateFormat: { weekday: 'short' } }
});Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels