-
-
Notifications
You must be signed in to change notification settings - Fork 114
Open
Milestone
Description
I'm fighting to format date in DatePicker. I like to set dateFormat in js manner without any transformation. so in my project I have subclassed datePiker and changed the run method from line 142:
if (strncmp($this->dateFormat, 'php:', 4) === 0) {
$this->clientOptions['dateFormat'] = FormatConverter::convertDatePhpToJui(substr($this->dateFormat, 4));
} else {
$this->clientOptions['dateFormat'] = FormatConverter::convertDateIcuToJui($this->dateFormat, 'date', $language);
}to:
if (strncmp($this->dateFormat, 'php:', 4) === 0) {
$this->clientOptions['dateFormat'] = FormatConverter::convertDatePhpToJui(substr($this->dateFormat, 4));
} else if (strncmp($this->dateFormat, 'js:', 3) === 0) {
$this->clientOptions['dateFormat'] = substr($this->dateFormat, 3);
} else {
$this->clientOptions['dateFormat'] = FormatConverter::convertDateIcuToJui($this->dateFormat, 'date', $language);
}I think that this can be usefoul and work very well.
Can you put this change in your code?
Metadata
Metadata
Assignees
Labels
No labels