Datepicker edit on Datatable default value

Hello,

It seems that the date picker popup remembers the last value from a previous field selected when editing a blank cell. This can be confusing to some users as it seems like a random date is being loaded.

How can we make the datepicker default to today's date if the cell being edited is blank?

See example here: if you click on the first cell, and then on the second cell, the editor shows 2010 instead of the current month and year.

https://snippet.webix.com/9c9cjsqk

Thanks!

Comments

  • try to override default focus behavior

    webix.editors.date.focus = function(){
      var calendar = this.getPopup().getBody();
      calendar.showCalendar(calendar.getValue()||new Date())
    }
    
  • Thank you!

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion