Welcome Guest, Not a member yet? Register   Sign In
datepicker (mootools) and date attributes(ID)
#1

[eluser]fourcs[/eluser]
Can someone please give me an idea as to how to get mootools date ID's in the view? I've placed the script pointers appropriately but can't get the required ID/class(in the case of jquery's datepicker) embeded in the view. Thanks
#2

[eluser]TheFuzzy0ne[/eluser]
What do you mean by "Date IDs"?
#3

[eluser]fourcs[/eluser]
Thanks for responding. Both mootools and jquery require an ID or class attribute to flag the date input in the input form. I'm struggling with how to do this.
#4

[eluser]TheFuzzy0ne[/eluser]
Can you post what you have so far?
#5

[eluser]fourcs[/eluser]
Thanks for your reply. I've stopped using the CI form_input function and am using the straight html tag to allow me to incorporate both the id and class attributes. I'm using an assets_helper to set up the javascripts, css, and img url paths. A source code reading indicates that the browser is getting the css and javascripts url's in the html file head, but the jquery date picker is not working at all. I know I've probably got the wrong url for the calendar.png icon image, but I would expect to still get something.
css: incorporates jquery style for date picker

I've attached a few files.

Update: I've just added the jquery page specific script that puts out the calendar. Now I just have to get the image url and date format set properly.

Update: Tweaked the page specific datepicker script to get the date formatted. Now on to getting the asset_helper to work in the css to give me the calendar.png icon. The asset_helper function works but the jquery css is not working in conjunction with that asset_helper to produce the icon.
#6

[eluser]TheFuzzy0ne[/eluser]
[quote author="fourcs" date="1240480909"]I've attached a few files.[/quote]

You have? Are they super-duper top secret files that I don't have clearance to see? Tongue
#7

[eluser]fourcs[/eluser]
I'll try again.
mystyles.css
config.php
records_input.php

Thanks
#8

[eluser]fourcs[/eluser]
CI is generating the references to the jquery, css, and image properly, but the jquery icon isn't appearing. The same configuration works in a jquery sample page.

<code>
&lt;html&gt;
&lt;head&gt;

&lt;title&gt;&lt;?php echo $title;?&gt;&lt;/title&gt;

&lt;?= style('mystyles');?&gt;


&lt;?= jscript('jquery.min');?&gt;[removed]
&lt;?= jscript('date');?&gt;
&lt;?= jscript('jquery.datePicker');?&gt;[removed]

&lt;!-- datePicker required styles --&gt;

&lt;link rel="stylesheet" type="text/css" media="screen" href=&lt;?=style('datePicker');?&gt;

&lt;!-- page specific styles --&gt;
&lt;link rel="stylesheet" type="text/css" media="screen" href=&lt;?=style('demo');?&gt;

&lt;!-- page specific scripts --&gt;
[removed]
$(function()
{
$('.date-pick').datePicker({clickInput:true})
});
[removed]

[removed]
Date.firstDayOfWeek = 0;
Date.format = 'yyyy/mm/dd';
$(function()
{
$('.date-pick').datePicker()
});
[removed]



&lt;/head&gt;
&lt;body&gt;


<div id="header">
&lt;? $this->load->view('records_header'); ?&gt;
</div>
<div id="menu">
&lt;? $this->load->view('records_menu'); ?&gt;
</div>
&lt;? echo heading($forminput,3) ?&gt;
&lt;? echo form_open('records/input'); ?&gt;
&lt;? echo form_hidden('id',$fid['value']); ?&gt;
&lt;? echo $dt_start .' : '.form_input($fdt_start).br(); ?&gt;
&lt;? echo $dt_end .' :&nbsp;&nbsp; '.form_input($fdt_end).br(); ?&gt;
&lt;? echo $cat. ' : '.
form_dropdown('category',$category,$fcategory['value']).br(); ?&gt;
&lt;? echo $bed .' : '.
form_dropdown('beds',$beds,$fbeds['value']).br(); ?&gt;
&lt;? echo $sb_Price_Range .' : '.
form_dropdown('sb_Price_Range',$sbprs,$fsb_Price_Range['value']).br(); ?&gt;
&lt;? echo $sb_Price .' : '.
form_input($fsb_Price).br(); ?&gt;
&lt;? echo $normal_Price .' : '.
form_input($fnormal_Price).br(); ?&gt;

&lt;? echo form_submit('mysubmit','Submit!'); ?&gt;
&lt;? echo form_close(); ?&gt;

<div id="footer">
&lt;? $this->load->view('records_footer'); ?&gt;
</div>

&lt;/body&gt;
&lt;/html&gt;


</code>

Update:
Using the assets_helper for the datePicker.css has solved the problem. I still have to get the line spacing correct. This seems to be a case of tweaking the jquery script.

Update:
I've succeeded in tweaking the ui.datepicker to align the html the way I wanted.




Theme © iAndrew 2016 - Forum software by © MyBB