IT gIrLy GiRl
IT gIrLy GiRl

Reputation: 337

Need datepicker which shows date in other format

I want a date picker which gives the date in this format

January 19, 2012

I already have some date pickers but they are showing dates like this:

12/10/2013

Upvotes: 3

Views: 95

Answers (3)

Vignesh Kumar A
Vignesh Kumar A

Reputation: 28413

Try this Demo

Script

 <script src="//code.jquery.com/jquery-1.9.1.js"></script>
    <script src="//code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
    <script type="text/javascript">
        $(function () {
            $('#datepicker').datepicker({
                dateFormat: 'MM dd,yy', onSelect: function (datetext) {
                    $('#datepicker').val(datetext);
                },
            });
        });
    </script>

HTML

<input type="text" id="datepicker"/>

Upvotes: 2

Aklesh Rathaur
Aklesh Rathaur

Reputation: 1847

Try this.

set this to ur date picker.

datePicker.timeZone = [NSTimeZone localTimeZone];
    self.datePicker.datePickerMode = UIDatePickerModeDate;

Upvotes: 0

Santhosh
Santhosh

Reputation: 8207

Lots of formats here

You can even customise them. Hope it helps!

Upvotes: 4

Related Questions