allow data-datepicker and data-datetimepicker, fix

This commit is contained in:
vitalets
2013-07-21 03:35:14 +04:00
parent 40e0a890a2
commit 0eb6a0ffff
4 changed files with 23 additions and 1 deletions
src/inputs
date
datetime
test/unit

@ -133,7 +133,14 @@ $(function () {
equal(frmt(e.data('editable').value, 'yyyy-mm-dd'), d, 'value correct');
equal(e.text(), dview, 'text correct');
});
});
test("datepicker options can be defined in data-datepicker string", function () {
var e = $('<a href="#" data-type="date" data-datepicker="{weekStart: 2}" data-pk="1" data-url="/post"></a>').appendTo('#qunit-fixture').editable({
});
equal(e.data('editable').input.options.datepicker.weekStart, 2, 'options applied correct');
});
test("input should contain today if element is empty", function () {