From 58cef289674717027b6b470044504a661f3bd9ad Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 6 Feb 2016 18:08:41 -0500 Subject: The date time format can be chosen in application settings --- app/Helper/Task.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'app/Helper/Task.php') diff --git a/app/Helper/Task.php b/app/Helper/Task.php index 0ef3da2c..e85d6e30 100644 --- a/app/Helper/Task.php +++ b/app/Helper/Task.php @@ -142,7 +142,7 @@ class Task extends Base public function selectStartDate(array $values, array $errors = array(), array $attributes = array()) { - $placeholder = $this->helper->text->in($this->config->get('application_date_format'), $this->dateParser->getAvailableFormats()); + $placeholder = date($this->config->get('application_date_format', 'm/d/Y H:i')); $attributes = array_merge(array('tabindex="11"', 'placeholder="'.$placeholder.'"'), $attributes); $html = $this->helper->form->label(t('Start Date'), 'date_started'); @@ -153,12 +153,11 @@ class Task extends Base public function selectDueDate(array $values, array $errors = array(), array $attributes = array()) { - $placeholder = $this->helper->text->in($this->config->get('application_date_format'), $this->dateParser->getAvailableFormats()); + $placeholder = date($this->config->get('application_date_format', 'm/d/Y')); $attributes = array_merge(array('tabindex="12"', 'placeholder="'.$placeholder.'"'), $attributes); $html = $this->helper->form->label(t('Due Date'), 'date_due'); $html .= $this->helper->form->text('date_due', $values, $errors, $attributes, 'form-date'); - $html .= '
'.t('Others formats accepted: %s and %s', date('Y-m-d'), date('Y_m_d')).'
'; return $html; } -- cgit v1.2.3