views:

14

answers:

1

hello i have a field in mysql that is datetime format. if i use datepicker to select a date it dosen't pass the time. is there a way to use a format for example: dd/mm/yy H:m:s

i have included the code i am using and would be grateful for any help.

many thanks

<SCRIPT type=text/javascript>
    $(function() {
        $("#datepicker").datepicker({
            changeMonth: true,
            changeYear: true,
            yearRange: '2010:2030',
            dateFormat: 'dd/mm/yy',
            minDate: 0,
            defaultDate: null 
        });

    });
    </SCRIPT>
A: 

Datepicker is for picking dates. If you want a date and time picker, you need to look elsewhere, such as the suggestions in these answers.

If you're just looking to supply a default time (for instance, midnight) in the formatted result, you can do that by including it (literally, e.g. 00:00:00) in your dateFormat option.

T.J. Crowder
thank you TJ. will check out your link
Mr.Putersmit