ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Safecracker + Date field = no CSS styling?

March 27, 2011 7:56pm

Subscribe [4]
  • #1 / Mar 27, 2011 7:56pm

    benek

    189 posts

    I’m using Safecracker 2.0 on EE 2.1.3.

    I have a date field with date picker calendar thingy and the JS appears to function fine but the calendar thingy is not styled. Assuming it’s just missing its CSS file. The date field is in a Matrix field but the date field is a default EE field right? I don’t know if being inside Matrix is part of the problem of if any date field would be missing the picker styling.

    Before you ask, yes I do have <link href=”{path=css/_ee_saef_css}” type=“text/css” rel=“stylesheet” media=“screen” /> included in my template.

    Is there any extra CSS file somewhere that I need to include as well?

  • #2 / Mar 28, 2011 10:57am

    Sue Crocker

    26054 posts

    Hi, benek. No, you should only need to include the one css link.

    Can you do a screen shot? I’ll build out a non-matrix version as well.

  • #3 / Mar 28, 2011 4:01pm

    benek

    189 posts

    I’ve attached a screenshot. The date picker calendar text is inheriting my styles for link color and all that but obviously has no other styling.

    What you see in the screenshot is what appears right after I click in the date field to focus it.

  • #4 / Mar 29, 2011 9:49am

    Sue Crocker

    26054 posts

    The non-Matrix version works just fine using the standard date field. NOTE: I’m testing with EE2.1.4beta, which might make a bit of a difference.

    And with EE2.1.4b and the most recent version of Matrix, the matrix date field displays OK as well.

    NOTE: This is a very bland form.

  • #5 / Mar 29, 2011 3:50pm

    benek

    189 posts

    So what’s likely to be the difference? I don’t think I want to update to a beta version for this site. Do you think it’s just the difference between EE versions? Is there anything I can do to get it to work without updating EE to the beta, like including a CSS file manually? I can give you access to the page if you wanted to take a look.

  • #6 / Mar 30, 2011 7:21am

    Greg Salt

    3988 posts

    Hi benek,

    Can you temporarily add a standard field outside of Matrix just to test if that works as expected?

    Cheers

    Greg

  • #7 / Mar 30, 2011 5:42pm

    benek

    189 posts

    I’ve made a temporary standard date field and put it on the same template as the one within Matrix. Even the standard one does not work. Calendar appears unstyled just as the other one.

    Somehow the CSS is not working. Can you confirm this is correct:

    <link href="{path=css/_ee_saef_css}" type="text/css" rel="stylesheet" media="screen" />
  • #8 / Mar 31, 2011 8:59am

    Sue Crocker

    26054 posts

    Hi, benek. We’ve got your login details, so I’ll go look at this issue now.. will be back in a bit.

  • #9 / Mar 31, 2011 9:13am

    Sue Crocker

    26054 posts

    OK, noticed one thing:

    <link href="http://yoursitename.com/css/_ee_saef_css" type="text/css" rel="stylesheet" media="screen" />

    That file is missing, I was attempting to use a generic SC form in a newly created template.

  • #10 / Mar 31, 2011 8:11pm

    benek

    189 posts

    OK I’m confused. What CSS file is that path code meant to be referencing? The only files in /css/ are my own, nothing from the EE install there, so of course that file is not found. Why would anyone ever have a file with that name in their root css folder unless they created it themselves? Shouldn’t this path tag be pointing to an EE cp_theme file?

  • #11 / Mar 31, 2011 10:53pm

    John Henry Donovan

    12339 posts

    benek,

    the css in that URL is a trigger word to pull up your correct saef styles. Having a physical directory called css in your root is interfering with it in this case I believe. Same way have a folder named after a template group.

    Can you name your css folder something different and see if your styles appear please?

  • #12 / Mar 31, 2011 11:00pm

    benek

    189 posts

    No dice.

    Renamed my css folder to css1 and that is still looking like this:

    <link href="http://weddingbands.co.nz/css/_ee_saef_css" type="text/css" rel="stylesheet" media="screen" />

    Is there a file I can link to directly instead of using this path variable?

  • #13 / Mar 31, 2011 11:08pm

    John Henry Donovan

    12339 posts

    benek,

    It will still look like that.
    Your htaccess is the issue here I think.
    Look here

    http://weddingbands.co.nz/index.php/css/_ee_saef_css

    Your css displays correctly

    You may need to add ‘css’ to your htaccess rule

  • #14 / Mar 31, 2011 11:23pm

    benek

    189 posts

    I’m using the “include method” through NSM .htaccess generator and I’m not sure how to modify that to not interfere with this.

    However, I’ve changed the css link in my template to

    <link href="/index.php/css/_ee_saef_css" type="text/css" rel="stylesheet" media="screen" />

    rather than using the path variable and it’s almost working now! The calendar is styled however the next and previous month buttons on the top corners do not show up. Is this a problem with some image path in the css?

    How can I get this to work and keep my css directory in the root named “css”? Possible? I’d like to stick with my common naming conventions here if possible.

  • #15 / Mar 31, 2011 11:29pm

    John Henry Donovan

    12339 posts

    benek,

    I may have been wrong on my first inclination so try renaming the folder back to just css and see if it works.

    The missing images looks like a bug. Can you go ahead and report that please?

    For a quick fix copy the ui-icons images from /themes/cp_themes/default/images to your root images folder.
    There is about 6 of them

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases