Author Topic: date filter datepicker problem  (Read 1836 times)

mscodigno

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 24
    • View Profile
date filter datepicker problem
« on: March 17, 2021, 02:47:45 pm »
Hello, I have a column of dates in 'dd / mm / yy' format. When I want to filter, I get incorrect results.
I have bootstrap-datepicker plugin in my theme. The format of the date I choose is 'dd.mm.yy'. I think the problem is caused by the format of this plugin.

https://jsfiddle.net/zekeriyaerogluu/kqmzv45u/18/

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6309
    • View Profile
Re: date filter datepicker problem
« Reply #1 on: March 18, 2021, 10:47:52 am »
bootstrap-datepicker plugin is not working in your jsfiddle.

mscodigno

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 24
    • View Profile

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6309
    • View Profile
Re: date filter datepicker problem
« Reply #3 on: March 18, 2021, 01:07:27 pm »
Please use filter.dpOptions to pass format option to bootstrap datepicker.

Code: [Select]
dpOptions: {
format: 'dd/mm/yyyy'
}

https://jsfiddle.net/97021zbs/

mscodigno

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 24
    • View Profile
Re: date filter datepicker problem
« Reply #4 on: March 18, 2021, 05:10:05 pm »
It works in jsfiddle but when I apply it to the project, it looks like 'dd / mm / yyyy' as an image but it does the filtering in 'mm / dd / yyyy' format and gives wrong results. (If I select a day other than 1-12 from the day section of the date picker, it doesn't show any results.)