Author Topic: How to use standard (html5) date type in input dialog?  (Read 560 times)

arbyter

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 43
  • Retired IT Guy
    • View Profile
How to use standard (html5) date type in input dialog?
« on: March 09, 2022, 07:35:29 pm »
Instead of implementing hand knitten calender widgets i would prefer to have 'input type=date' in the grid.
I did apply a patch in pqgrid.dev.js (version 8.1.2)  line 5089 -->
inp = "<input class='" + cls2 + "' " + attr + " " + style + " type="+(objP.column.dataType=="date"?"date":"text")+" name='" + dataIndx + "' />"    //rh use html5 data input widget in modern browsers
but thats just a quick and dirty solution.
 
Maybe you take this as a feature-request?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6309
    • View Profile
Re: How to use standard (html5) date type in input dialog?
« Reply #1 on: March 11, 2022, 10:45:16 pm »
That can also be done in dateEditor function in https://paramquery.com/pro/demos/editing_custom

Code: [Select]
//initialize the editor
            $inp.attr('type','date').val(val)

instead of using jQueryUI date picker.