0

I am looking to implement a datepicker for an expiry date. Seeing how these dates are, some have the day e.g 10/12/2013 while others have only month and year e.g Dec 2013, I would like the user to be allowed to pick a day/month/year if the expiry is so as in the former example or month/year as in the latter.

I am using the stock jquery datepicker, I am not able to implement these options. Is it possible with this, or would i need a better plugin for such?

Thanks, regards. Help Appreciated.

watkib
  • 347
  • 3
  • 11
  • 25

3 Answers3

1

As far as I know jQuery UI datepicker does not support such sort of functionality. However there is another jQuery plugin that can be configured to allow you to choose month only (see the "Select a month only" example on the linked page).

Andrei
  • 55,890
  • 9
  • 87
  • 108
1

Take a look at the following question:

jQuery UI DatePicker to show month year only

maybe it is the same issue

Community
  • 1
  • 1
Fseee
  • 2,476
  • 9
  • 40
  • 63
0

try this

 $(document).ready(function(){
      $(".datepicker").datepicker({ dateFormat: 'dd/mm/yy' }).val();
 })

or

 $(document).ready(function(){
    $(".datepicker").datepicker({ dateFormat: 'yy-mm-dd' }).val();
 })

is this you looking ?

Nytram
  • 521
  • 1
  • 6
  • 21