4 Replies - 3632 Views - Last Post: 10 December 2012 - 03:59 AM

#1 Xna4life  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 78
  • Joined: 21-February 12

jquery.datePicker not working

Posted 03 December 2012 - 10:31 AM

Im fairly new to this so please bear with... I'm using the tutorial @ http://www.kelvinluc...demo/index.html to allow the user to select dates from a calendar

however I can't seem to get it working could someone please advise if I am going about this the wrong way...

'jquery.datePicker.js & datePicker.css' can be downloaded at near the top of the page on... http://www.kelvinluc...demo/index.html

1)copy the code in the '•jquery.datePicker.js ' inside my tags in my view 2) copy the datePicker.css code into my css file 3) paste the following into the top of my view page:
<!-- jQuery -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>

<!-- required plugins -->
<script type="text/javascript" src="scripts/date.js"></script>
<!--[if IE]><script type="text/javascript" src="scripts/jquery.bgiframe.js"></script><![endif]-->

<!-- jquery.datePicker.js -->
<script type="text/javascript" src="scripts/jquery.datePicker.js"></script>



This does not work...iv tried doing the first demo and replacting the .js data inside my <script>tags wit $(function()
{
    $('.date-pick').datePicker();
});
and then adding the following to .css

/* located in demo.css and creates a little calendar icon
 * instead of a text link for "Choose date"
 */
a.dp-choose-date {
    float: left;
    width: 16px;
    height: 16px;
    padding: 0;
    margin: 5px 3px 0;
    display: block;
    text-indent: -2000px;
    overflow: hidden;
    background: url(calendar.png) no-repeat; 
}
a.dp-choose-date.dp-disabled {
    background-position: 0 -20px;
    cursor: default;
}
/* makes the input field shorter once the date picker code
 * has run (to allow space for the calendar icon
 */
input.dp-applied {
    width: 140px;
    float: left;
}



could someone please tell me what I am doing wrong?

Thanks J

Is This A Good Question/Topic? 0
  • +

Replies To: jquery.datePicker not working

#2 BetaWar  Icon User is offline

  • #include "soul.h"
  • member icon

Reputation: 1147
  • View blog
  • Posts: 7,134
  • Joined: 07-September 06

Re: jquery.datePicker not working

Posted 03 December 2012 - 11:52 AM

I am going to move this to jQuery so it will get more of the appropriate expertise looking at it.
Was This Post Helpful? 0
  • +
  • -

#3 Xna4life  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 78
  • Joined: 21-February 12

Re: jquery.datePicker not working

Posted 04 December 2012 - 02:42 AM

ok thanks....
any ideas guys?
Was This Post Helpful? 0
  • +
  • -

#4 SpAm101  Icon User is offline

  • D.I.C Head

Reputation: 11
  • View blog
  • Posts: 54
  • Joined: 28-November 12

Re: jquery.datePicker not working

Posted 10 December 2012 - 02:50 AM

Hi Xna4life

I know it's not the best solution to immediately suggest using something else, however using different JQuery plugins can be awfully confusing if you're not used t JQuery. As such, I would recommend maybe using a simpler one, such as Jquery UI date-picker:

http://jqueryui.com/...r/#icon-trigger

:)
Was This Post Helpful? 1
  • +
  • -

#5 Xna4life  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 78
  • Joined: 21-February 12

Re: jquery.datePicker not working

Posted 10 December 2012 - 03:59 AM

View PostSpAm101, on 10 December 2012 - 02:50 AM, said:

Hi Xna4life

I know it's not the best solution to immediately suggest using something else, however using different JQuery plugins can be awfully confusing if you're not used t JQuery. As such, I would recommend maybe using a simpler one, such as Jquery UI date-picker:

http://jqueryui.com/...r/#icon-trigger

:)/>

Thanks spam 101...this was a great help
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1