Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing error when changing the format of the customdatepicker #334

Open
bhorvat opened this issue Mar 15, 2014 · 1 comment
Open

Parsing error when changing the format of the customdatepicker #334

bhorvat opened this issue Mar 15, 2014 · 1 comment

Comments

@bhorvat
Copy link

bhorvat commented Mar 15, 2014

I have tried to override the default format of the date picker, however when value is submitted it fails to be parsed.

Code that can trigger the issue

Java

@Property
@Persist
private Date date;

public String getFormat() {
    return "yy-mm-dd";
}

@Log
public JSONObject getParams() {
    return new JSONObject("dateFormat", getFormat());
}

public String getDateFormated() {
    SimpleDateFormat format = new SimpleDateFormat(getFormat());
    return format.format(date);
}

TML

  <form t:type="form" t:id="idForm">${DateFormated}
        <t:label t:for="dateField">The Date : </t:label>
        <t:datefield t:id="dateField" t:value="date" 
                     t:mixins="jquery/CustomDatepicker" t:params="params"/>
        <t:submit/>
   </form>
@bhorvat
Copy link
Author

bhorvat commented May 25, 2014

Any updates/checks/info on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants