Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: Value Formatter Passed as Function is Treated as String in Vue Application's BL Datepicker #975

Open
1 task
mehmetranas opened this issue Jan 3, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@mehmetranas
Copy link
Contributor

Issue description

Description:

In my Vue application, when I pass a value formatter to the BL Datepicker, it is incorrectly treated as a string rather than as a function.

Steps to Reproduce:

  1. Pass a value formatter as a function to the BL Datepicker component.
  2. Observe the behavior when interacting with the date picker.

Actual Behavior:

The value formatter is interpreted as a string, resulting in unexpected behavior.

Expected Behavior:

The value formatter should be treated as a function and executed accordingly, not as a string.

Media & Screenshots

Screenshot 2025-01-03 at 12 01 04
Screenshot 2025-01-03 at 12 03 49

Baklava Version

3.3.0 beta.9

Operating system

  • OS: macos

  • Browser: chrome

  • Application: Vue 2.7

Priority this issue should have

Medium (should be fixed soon)

Please review the checkboxes that are applicable.

  • This issue is directly related to React
@mehmetranas mehmetranas added the bug Something isn't working label Jan 3, 2025
@dilandoogan
Copy link
Contributor

I was able to use valueFormetter feature like this

const formatDates = (dates: Date[]) => dates?.join(',');

<BlDatepicker
  type='range'
  className={styles.filter}
  onBlDatepickerChange={(event) => setRangePickerDates(event.detail)}
  ref={datepickerRef}
  valueFormatter={formatDates}
/>

What is the problem that you encountered ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants