hi there,

i have a site which has a jquery datepicker in it.

i went onto jquerys site and downloaded the timepicker code and tried to add this in but it is not working.

currently my code is:

$('.datepicker').datepick({
                dateFormat: "dd/mm/yyyy",
                alignment: 'bottom',
                showOtherMonths: true,
                selectOtherMonths: true,
                renderer: {
                    picker: '<div class="datepick block-border clearfix form"><div class="mini-calendar clearfix">' +
                            '{months}</div></div>',
                    monthRow: '{months}', 
                    month: '<div class="calendar-controls" style="white-space: nowrap">' +
                                '{monthHeader:M yyyy}' +
                            '</div>' +
                            '<table cellspacing="0">' +
                                '<thead>{weekHeader}</thead>' +
                                '<tbody>{weeks}</tbody></table>', 
                    weekHeader: '<tr>{days}</tr>', 
                    dayHeader: '<th>{day}</th>', 
                    week: '<tr>{days}</tr>', 
                    day: '<td>{day}</td>', 
                    monthSelector: '.month', 
                    daySelector: 'td', 
                    rtlClass: 'rtl', 
                    multiClass: 'multi', 
                    defaultClass: 'default', 
                    selectedClass: 'selected', 
                    highlightedClass: 'highlight', 
                    todayClass: 'today', 
                    otherMonthClass: 'other-month', 
                    weekendClass: 'week-end', 
                    commandClass: 'calendar', 
                    commandLinkClass: 'button',
                    timepicker:false,
                    disabledClass: 'unavailable'



<script src="jquery.js"></script>
<script src="js/libs/jquery.datepick/jquery.datepick.min.js"></script>
    <script src="jquery.datetimepicker.js"></script>

anyone help to where i am going wrong?

thanks

Member Avatar for iamthwee

'Not working' is vague please clarify

does not do anything

Member Avatar for iamthwee

Also it looks like you are missing a closing end parentheses.
In chrome you can do an inspect element and it should show an error due to the javascript. That would also help you.

so in my input form field if i want to use the timepicker all i need to do is what?

i cannot get it to work using the jquery example site at all.

thanks

Member Avatar for diafol

check your paths for the src's.
Also as mentioned, check the console for errors (Inspect Element > Console for Chrome).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.