Poll component supports mobile environment

- 설문조사 컴포넌트의 모바일 장치 지원
- 브라우저 자체 datepicker 를 지원하는 경우 jQuery datepicker 는 나타내지 않음 (중복 UI 정리)
- 자체 datepicker 로 입력하는 경우에도 정상적으로 날짜 처리.
This commit is contained in:
MinSoo Kim 2016-01-27 00:01:53 +09:00
parent eef87175d4
commit 43b82c0e5f
5 changed files with 43 additions and 25 deletions

View file

@ -19,7 +19,12 @@ class pollController extends poll
*/
function procPollInsert()
{
$stop_date = Context::get('stop_date');
$stop_date = intval(Context::get('stop_date'));
// mobile input date format can be different
if($stop_date != Context::get('stop_date'))
{
$stop_date = date('Ymd', strtodate(Context::get('stop_date')));
}
if($stop_date < date('Ymd'))
{
$stop_date = date('YmdHis', $_SERVER['REQUEST_TIME']+60*60*24*30);