Permalink
Browse files

Merge branch 'feature/bugfix-#1266' into develop

  • Loading branch information...
2 parents 3350f8a + 8d6f0f0 commit af5dbb27b1a8fe63b9a256abed963f5336c528a3 @psmolenski psmolenski committed Feb 10, 2014
Showing with 33 additions and 3 deletions.
  1. +2 −1 Gruntfile.js
  2. +2 −2 src/editors/dateEditor.js
  3. +29 −0 test/jasmine/spec/editors/dateEditorSpec.js
View
@@ -225,7 +225,8 @@ module.exports = function (grunt) {
styles: [
'test/jasmine/css/SpecRunner.css',
'dist/jquery.handsontable.css',
- 'extensions/jquery.handsontable.removeRow.css'
+ 'extensions/jquery.handsontable.removeRow.css',
+ 'lib/jquery-ui/css/ui-bootstrap/jquery-ui.custom.css'
],
vendor: [
'lib/jquery.min.js',
@@ -36,8 +36,8 @@
showButtonPanel: true,
changeMonth: true,
changeYear: true,
- altField: this.$textarea,
- onSelect: function () {
+ onSelect: function (dateStr) {
+ that.setValue(dateStr);
that.finishEditing(false);
}
};
@@ -131,4 +131,33 @@ describe('DateEditor', function () {
expect($('.htDatepickerHolder').is(':visible')).toBe(false);
});
+
+ it("should enable to input any value in textarea", function () {
+ var hot = handsontable({
+ data: getDates(),
+ columns: [
+ {
+ type: 'date'
+ }
+ ]
+ });
+
+ selectCell(0, 0);
+
+ var editor = hot.getActiveEditor();
+
+ editor.beginEditing();
+
+ expect(editor.isOpened()).toBe(true);
+
+ editor.TEXTAREA.value = 'foo';
+ keyDownUp('o'.charCodeAt(0));
+
+ expect(editor.getValue()).toEqual('foo');
+
+ editor.finishEditing();
+
+ expect(getDataAtCell(0, 0)).toEqual('foo');
+
+ });
});

0 comments on commit af5dbb2

Please sign in to comment.