Replace deprecated String.prototype.substr()
Replace deprecated String.prototype.substr()

String.prototype.substr() is deprecated (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substr) so we replace it with slice() which works similarily but isn't deprecated.
Signed-off-by: Tobias Speicher <0bf48b1b307ef620053f01d201166f9ed9f81d78@gmail.com>

xdan/datetimepicker,xdan/datetimepicker