Extending the settings object - not sure why this is not working
- (function( $ ){
- var settings = {
- 'daysInMonth': [31,28,31,30,31,30,31,31,30,31,30,31],
- 'dayAbbrev':["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
- 'monFull':["January", "February", "March","April","May","June","July","August","September","October","November","December"],
- 'startYear':(new Date().getFullYear()),
- 'minYear':2005,
- 'endYear':2020,
- 'startDate': null,
- 'hasTime':true,
- 'timeSelectLabel':'Time Selection',
- 'maxMin':45,
- 'minInterval':5
- };
- var methods = {
- init : function( options ) {
- $(this).click(function(){
- var o=settings;
- if(options){
- alert('about to xtend');
- $.extend(o,options);
- }
-
- if ($(".dtp").length>0){
- $(".dtp").show();
- return;
- }
Im trying to extend the settings object so that I can merge options.
minYear as you can see is set to 2005.
If i try this
- <script type="text/javascript">
- $("document").ready(function(){
- $(".dtpick").dtpicker('init',{
- 'minYear':2002
- });
- });
- </script>
the new minyear is not set.
Im not sure what Im doing wrong