# Calender Control

**URL:** <https://www.ruby-forum.com/t/calender-control/165122>\
**Category:** Rails\
**Created:** [April 9, 2009, 10:45am UTC](https://www.ruby-forum.com/t/calender-control/165122 "2009-04-09T10:45:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vaibhav\_darji](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/a4c791/32.png) [@vaibhav\_darji](https://www.ruby-forum.com/u/vaibhav_darji)\
**Post date:** [April 9, 2009, 10:45am UTC](https://www.ruby-forum.com/t/calender-control/165122/1 "2009-04-09T10:45:42Z")

</div>

I want to use the calender control in my application like what i added  
in the attachment file for, from date and to date it should display  
records but i unable to attach it in ruby on rails application well its  
working fine in Dot Net too…  
I want to show the records between first and the second textbox field  
date entries i am going to use the code

@date1=params[:date1]  
@date2=params[:date2]

@date2ss = Date2.find(:all, :conditions =\> “ID \> '”+ @date1 +"’ and ID  
\<’"+ @date2+"’")

Problems  
1\>how i validate the calender date fields in the text boxes?  
2\>how i use the calender control in ruby on rails application?  
(…so that on click of that control it display the calender and on  
selecting the date should be display in the respected text box…)  
thanks in advance,  
vaibhavi
