Results 1 to 2 of 2

Thread: Customdate Editor

  1. #1
    Join Date
    Jun 2007
    Posts
    5

    Default Customdate Editor

    hi,
    i encountered a strange problem.plz help me .that is when i m click web page link at that time it shows yyyy-mm-dd hh:mm:ss:m,and when i am clicking show records at that time is showing mm/dd/yyyy format.i need mm/dd/yyyy format.i mean when i m going throw showform it shows
    yyyy-mm-dd hh:mm:ss:m format.when i m go throw onsubmit it showing mm/dd/yyyy format.i realy want mm/dd/yyyy format at both times.

    here is my code

    protected static final CustomDateEditor DATE_EDITOR = new CustomDateEditor(
    new SimpleDateFormat("MM/dd/yyyy"), true);


    @Override
    protected void initBinder(HttpServletRequest request,
    ServletRequestDataBinder binder) throws Exception {

    binder.registerCustomEditor(Date.class,DATE_EDITOR );
    super.initBinder(request, binder);
    }

  2. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,624

    Default

    Please don't crosspost!
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •