Iris
Iris

Reputation: 1

How to use datepicker in Spring MVC

I am using Spring MVC for my Web apps, but I really don't know how to use Datepicker with Spring, because, way of Spring that data what from tag of spring is mapped into variable of corresponding Object via path="" property.But in my page which include Date component tof hat form tablig spring is not support this component.

Please help me!

And,There is a problem with this.Follow as: After selecting or inputting value and submit but this value is not mapp into databse via hibernate

Upvotes: 0

Views: 7705

Answers (1)

Waldemar Schneider
Waldemar Schneider

Reputation: 174

if you use the field set the path to your date object and use jquery (or some other javascript library) to generate a datepicker (like this one http://jqueryui.com/datepicker/). and initialize your datepicker:

<script>
  $(function() {
    $( "#date" ).datepicker(); // give your date field an id or a date css class
  });
</script>

Upvotes: 2

Related Questions