javascript - Liferay input-date displaying letter "d" -
as mentioned in question tried change date format of liferays input-date field. far successfull. testing in different browsers , noticed firefox messes date when click field. no problems in ie or chrome.
it displays current date 18.08.2017. when click field (no change of date moment) displays d.08.2017. @ first thought messed due format changes. after undoing these error still exists...
the value working normal , java method doesnt erros. can change date in picker , hidden fields have correct value. visible part of date messed up.
i looked console , saw, liferay.form undefined. dont know if it's relevant @ all. ie , chrome displaying errors too, displaying date normally.
chrome: uncaught typeerror: cannot read property 'get' of undefined ie: unable property "get" of undefined or null reference ff: typeerror: liferay.form undefined
how can rid of error?
edit:
that's code i'm using datepicker:
calendar calendar = calendar.getinstance(); if(renderrequest.getattribute("task") != null){ string datefrom = (string)renderrequest.getattribute("date_from"); simpledateformat format = new simpledateformat("dd.mm.yyyy"); date date = format.parse(datefrom); calendar.settime(date); }else{ calendar.add(calendar.day_of_month, (getterutil.getinteger(portletpreferences.getvalue("daterange", "7"))*-1)); }%> <liferay-ui:input-date firstdayofweek="1" yearvalue="<%=calendar.get(calendar.year)%>" monthvalue="<%=calendar.get(calendar.month)%>" dayvalue="<%=calendar.get(calendar.day_of_month)%>" dayparam="datefrom-day" monthparam="datefrom-month" yearparam="datefrom-year" />
i don't have js code, because i've written none.
Comments
Post a Comment