Skip to main content
Inspiring
Feb 12, 2013 11:26 PM UTC
Question

cfinput datefield alignment

I've seen a couple posts about this on a couple different sites/blogs, but no solutions, so I figured I'd post the question myself and see if anyone's come up with any workarounds or alternatives.

I love the functionality of the cfinput type="datefield", but I'm having the common problem that I cannot get it to display inline. For example, I'm working on a calendar, and on the create_event.cfm page, I want to use these inputs for the dates and for repeating event options. The line I'm trying to have on the page is:

Repeat daily until <cfinput type="datefield" name="repeatuntil">

However, when the page loads, because of the <div> tag and css that CF automatically generates, it aligns the datefield to the left, as if it was written like this:

<cfinput type="datefield" name"repeatuntil"> Repeat daily until

Does anyone know a way to override the automatically generated css to get it to display where I want it? If not, does anyone know of a good alternative where I can still have the input field with a poput calendar to choose a date?

Would appreciate any help. Thanks so much!

JAW

    This topic is closed to new replies. Start a new post to keep the conversation going.

    3 replies

    Inspiring
    Feb 12, 2013 11:46 PM UTC

    Last time I checked, <cfinput type="datefield"> rendered a flash movie which turned me right off.  There are lots of javascript/jQuery options available.  They are easy to find on the net and a lot easier to work with.

    Translate
    jawmusicAuthor
    Inspiring
    Feb 13, 2013 12:15 AM UTC

    Yeah, I can’t tell if it’s a flash movie of just a javascript popup (I don’t know enough about either to tell), but I did wonder about just extracting the HTML that coldfusion generates and editing it to fit my needs. Conveniently, the view source option shows you everything it’s doing, so if I experiment more I could probably figure that out. I just figured maybe someone had found an easy workaround that would accomplish the task easily. I’ll explore other options as you mentioned. Thanks!

    Translate
    Inspiring
    Feb 13, 2013 3:02 AM UTC

    The view source will also tell you if your input is html or flash.

    Translate