silverstripe-framework/tests/forms/DatefieldViewJQueryTest.php
Ingo Schommer d67c43ad7d ENHANCEMENT Using jQuery UI datepicker in DateField and DatetimeField instead of outdated DHTML calendar.js (fixes #5397)
ENHANCEMENT Abstracted optional DateField->setConfig('showcalendar') logic to DateField_View_JQuery (from r107438)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112597 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 03:48:39 +00:00

24 lines
481 B
PHP

<?php
/**
* @package sapphire
* @subpackage tests
*/
class DateFieldViewJQueryTest extends SapphireTest {
function testConvert() {
$this->assertEquals(
'M d, yy',
DateField_View_JQuery::convert_iso_to_jquery_format('MMM d, yyyy')
);
$this->assertEquals(
'd/mm/yy',
DateField_View_JQuery::convert_iso_to_jquery_format('d/MM/yyyy')
);
$this->assertEquals(
'dd.mm.yy',
DateField_View_JQuery::convert_iso_to_jquery_format('dd.MM.yyyy')
);
}
}