5

Is there a plugin to implement datetimepicker in handsontable? The closest I got was pickadate fork here but I have no clue how to implement this in Handsontable.

VariSingh
  • 59
  • 1
  • 6

2 Answers2

3

You can achieve this by modifying the file handsontable.full.js. Take this file: http://handsontable.com/dist/handsontable.full.js

Find the section "Pikaday":

/*!
 * Pikaday
 *
 * Copyright © 2014 David Bushell | BSD & MIT license | https://github.com/dbushell/Pikaday
 */

(function (root, factory)
{

.......

    return Pikaday;

}));

Replace it with this fork: https://github.com/owenmead/Pikaday/blob/master/pikaday.js

Then specify the date format like: dateFormat: "YYYY-MM-DD HH:mm".

Stéphane Laurent
  • 75,186
  • 15
  • 119
  • 225
0

There are plenty of ways to customize existing date editors for HT. But sad thing pikaday.js doesn't support time selection (check section time picker https://github.com/Pikaday/Pikaday). You have to create custom dp for HT. https://handsontable.com/docs/8.1.0/tutorial-cell-editor.html

Take a look at

class CalendarEditor extends TextEditor

Or you can extend from

Handsontable.editors.DateEditor

Choose any date picker with time picker.