Author Topic: Trouble with datepicker  (Read 971 times)

NearEarthObject

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 30
    • View Profile
Trouble with datepicker
« on: August 14, 2021, 04:18:15 pm »
Hi !

I have column with datatype date, with an editor who init a function dateEditor :
Code: [Select]
function dateEditor(ui) {

var $inp = ui.$cell.find("input"),
    grid = this,
format = ui.column.format || "dd/mm/yy";



            //initialize the editor
    $inp
    .datepicker({
    changeMonth: true,
    changeYear: true,
    dateFormat: format,
        showAnim: '',
        onSelect: function () {
        this.firstOpen = true;
        },
        beforeShow: function (input, inst) {
        setTimeout(function () {
            $('.ui-datepicker').css('z-index', 999999999999);
            });
            return !this.firstOpen;
        },
        onClose: function () {
        this.focus();
        }
   });
}
The datepicker works well but once date is selected, and key press enter, the date gone and i receive a console message : "Cannot read property 'dpDiv'".

Any idea how to fix this ?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Trouble with datepicker
« Reply #1 on: August 16, 2021, 11:09:03 pm »
I'm looking into it.