Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7011227
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:06:00+00:00 2026-05-27T22:06:00+00:00

By default a java.util.Date field is represented in a CRUD form as a simple

  • 0

By default a java.util.Date field is represented in a CRUD form as a simple “DATE” input.

public class DatedModel extends Model {

    public Date creationDate;

in the CRUD admin I see:

creationDate           [TEXTINPUT]
                       yyyy-MM-dd format.

Is there any way to have a DateTime input instead, on selected fields only (not all of them modifying the application.conf date.format)?

Is there a way to affect which “widget” is used for a given field in the ‘automated’ CRUD admin?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T22:06:01+00:00Added an answer on May 27, 2026 at 10:06 pm

    I finally found in the documentation my answer:

    You can indeed customize each field; a more extensive example can be found on the lunatech blog using jquery datatables which also shows how to modify pagination.

    #{crud.table fields:['name', 'company']}
    
       #{crud.custom 'company'}
         <a href="@{Companies.show(object.company.id)}">
             ${object.company.name}
         </a>
       #{/crud.custom}
    
    #{/crud.table}
    

    PS.

    @AditSaxena hint was good and indeed a simple solution; but not what I wanted because it’s not acceptable that the ‘hint’ is not correct! Clearly confusing for a user!

    So for a datetime input (the specific question) we can combine the annotation (described in the doc)

     @As(lang={"*"}, value={"yyyy-MM-dd hh:mm:ss"}) 
    

    with a custom hint, eg.

       #{crud.custom 'mydate'}
       <span class="crudHelp">
           Date format: etcetc.
       </span>
         ...
       #{/crud.custom}
    

    I’ll also point out that you can write your own validator

    Other related useful questions:

    • Is it possible in playframework to override the default save action in the CRUD controller and redirect to list after
    • Play! framework CRUD module: adding default values and change date format?
    • Play framework CRUD file upload about custom file upload fields
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any sense to declare default constructor in Java? class MyClass { public
I'm trying to have a default java.util.Properties object in my class, with the default
Here is the code: import java.util.*; public class dayName { public static void main(String[]
By default, what time zone does method java.util.Date.toString() display? Since a Java Date stores
import java.util.Scanner; public class Mal { public static void main(String[] args) { System.out.println(Welcome); Scanner
import java.util.Scanner ; public class Mal { public static void main (String []args) {
I'm trying to change default firstDayOfWeek for java.util.Calendar from SUNDAY to MONDAY. Is it
Can I use java.util.Properties with encoding different then default?
I am currently using Logger from Java.Util, The default behavior for logger.info is like
I'm trying to map java.util.Date to postgresql timestamp without time zone type. I'm using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.