Pixfizz Knowledge Base
  • 👋Welcome to Pixfizz
  • Overview
    • 💡Getting Started Checklist
  • Installation to Ecommerce stores
    • Pixfizz Ecommerce
      • Setup Required Custom Fields
      • Setup Required Custom Types
      • Shopper FAQs
        • How to Add a Custom Font to my Site
      • Liquid Documentation
    • Shopify Ecommerce
      • 💫How to get started
      • 🛠️Shopify Installation
      • 🛠️Shopify Installation - Variable Pages
        • Add Saved Projects Functionality
      • Linking products to shopify
    • ETSY
      • Setting Up Listings in Pixfizz
      • Setting up SKU's in Etsy & Pixfizz
  • Production Management
    • What Output Options are there for Production?
    • Production PDF versions
    • Add Order Codes to Production Files
    • Add Dynamic Barcode
    • Add a QR Code Element
      • QR Code Content element substitutions
    • Receipt of Orders
    • Custom fulfillment folder name
    • Ability to provide file content directly in _additional_files.json
    • Add Trim Marks to Production Files
    • File Upload variants and template options
    • Film Processing
  • Fulfillment Partners
    • Request Access to a Catalog
    • Publishing Products from a Catalog to your Site
    • Change Background Color of Preview Images
    • Mixam
      • About Mixam
      • Get Started with Mixam
      • Product Catalog
      • Request a Print Sample from Mixam (optional)
      • Fullfilment of Mixam Products
      • Linking to Mixam API
    • Navitor
      • Product Catalog
    • LA Cameras
      • Product Catalog
  • eCommerce CMS
    • Setup Shipping Services
    • How to Setup Taxes
      • Setup Tax Exempt Users
    • Extra Fees
    • Custom Web Components
      • <px-image-upload>
      • <px-date-selector>
    • Import promocodes into Pixfizz admin
    • FAQ
      • Hide a page from Search Engine Crawls
    • Google Analytics & Google Tag Manager
      • Setup New Account
      • Setup eCommerce Events in Pixfizz CMS
  • PRODUCT SETUP & DESIGN
    • Product Pricing
    • How to Create Templates
      • XML Definition Parameters
      • XML Set Parameters
      • XML Page Parameters
      • PDF Layers
      • Define page break on Layflat spreads
      • Calendar Setup
        • Calendar Week Starting with Sunday
        • Calendar Week Starting with Monday
    • Setup Collections to Publish Products
      • How to add Filters to your Collections
    • File Artwork
    • MSP HUB content
      • Graduation Text Element Substitutions
    • Sample Templates
      • Photo Prints
      • Cards (Folded)
      • Canvas Prints
      • Framed Prints
      • Notebooks
      • Drinkware
      • Clothing
      • Photo Albums
      • Layflat Photo Albums
    • Designs
      • How to Build a Card - Part 1: Implement Design
      • How to Build a Card - Part 2: Add Design Flexibility with Substitutions
      • How to Build a Photo Album - Layouts
      • How to Build a Photo Album - Trim Marks on Cover & Page
      • Template Business Card EU
    • Template and Design Options
    • Help Guide for the Editor
    • User Editing Options
      • Standard Editor
      • PX Preview
  • Admin Guide
    • Domains
    • Setup reCAPTCHA
    • Analytics
    • 📪Dashboard
    • Orders
      • Orders
      • Abandoned Carts
      • Production Files
      • Projects
    • Users
      • Users
        • User Information
        • Merging Anonymous Users
        • Change Password
        • Custom Fields
        • Promocodes (Single User)
        • Last Orders
        • Projects
        • Galleries
        • Calendars
        • Addresses
      • Invites
    • Galleries
      • Galleries
      • Organize/Tag Galleries
      • Public galleries image source for upload dialog
    • Products
      • Products
      • Product Attributes
      • Templates
        • Designs
      • Collections
      • Fonts
      • Font Palettes
      • Color Palettes
      • Element Substitutions
        • Element substitutions on text variants replacing “Target Element Name”**
      • Calendars
      • Price Variables
    • Shipping
      • Shipping Services
        • Ranking Weight for Shipping Options
      • Packaging
      • Shipping Address of Origin
      • Taxes
      • Addresses
      • Liquid support for shipping formulas
    • Marketing
      • Promocodes
    • Website
      • Pages
      • Layouts
      • Snippets
      • Assets
      • Special Web Components
        • Date Selector Component
        • Dynamic Previews
    • Settings
      • General
        • Website Configuration
        • Domain Hosting
        • Facebook Integration
        • Instagram Integration
        • Dropbox Integration
          • Dropbox integration for upload dialog
        • API settings
        • Watermark
      • Email Notifications
        • Email Notification Settings
        • Order Pending Confirmation Email
        • Order Payment Confirmation Email
        • Order Shipped Email
        • Signup Email
        • Password Reset Email
        • Abandoned Cart Email
        • Refer A Friend Email
      • Design Tool
        • Name
        • Logo
        • Favicon
        • Brand Color
        • Page Title
        • Use New Editor
        • Autofill Button
        • Launch Into Autofill
        • Captions
        • Unedited Warning
        • Image Flip
        • Alignment Aids
          • Alignment highlights
        • Two Page Spread
        • Auto Cropping
        • Crop Bleed
        • Asymmetrical bleeds and margins
        • Image Effects
        • Image Rotation
        • Edit cut print projects
        • Placeholder Rotation
        • Image Borders
        • Background Colors
        • Border Radius
        • Image Size Overlay
        • Project Options
        • Display Price
        • Copy Shared Projects
        • Cut Print Mode
        • Multi-Image Uploader
        • Large Format / Wall-Art
        • Highlight Editable Elements
        • Use Mapped Preview
        • Homepage URL
        • Cart Page Name
        • Account Page Name
        • Upload Size Limit
        • Default Font
        • Default Font Palette
        • Default Font Size
        • Default Text Color Palette
        • Default Image Border Color Palette
        • Background Color Palette
        • Google Tag Manager ID
        • Image Sources
        • Categories
        • Quicksave Prompt Delay
        • Help URL
        • Resolution Warning
        • Text Cropping Warning
        • Multitext Custom Fields
        • Custom JS
        • Admin Custom JS
        • Custom CSS
        • Fill Multiple Placeholders with a Print
        • Auto-Generate Previews from Design Products
        • Shrink-to-Fit for px-Image-Upload
        • PDF Import Panel
      • Translations
      • OAuth
      • Documentation
    • Payment Gateways
      • Stripe Webhook for callbacks
      • PayU Money (India) Callback URL
  • Use Cases
    • 🎨For Designers
    • 🖥️For Developers
  • 🔗API
    • 🖼️Dynamic Design Previews
  • Setup GA4 eCommerce Analytics
  • 🌐SEO
  • Structured Data
    • Product Pages
    • Shop Pages: ItemList
  • INTEGRATIONS
    • Dropbox
    • Darkroom
    • Stamped.io
    • Shippo
      • Shippo Setup
    • Tracking Unlimited
      • Setup
      • Product Setup
        • Product Code
        • Product Options
        • Shipping Services
    • Syncovery
      • Installation
      • Profile Setup
      • DPOF Profile Setup
      • Scheduler
      • Advanced Workflow Automation
    • Indisposable
    • Klaviyo
  • Group 1
    • Form to update Order Status
Powered by GitBook
On this page
  1. eCommerce CMS
  2. Custom Web Components

<px-date-selector>

<px-date-selector> is a custom web component that is used in the Pixfizz CMS to select the starting date for a calendar or a planner project.

We're trying to keep web components minimal to avoid the need for any external JS dependencies.

<px-date-selector> is basically a collection of up to three select elements - for selecting the starting year, month, and day.

The day select only makes sense for daily or weekly calendars and is otherwise omitted. Currently the <px-date-selector> component accepts a start-date attribute in the format yyyy-mm-dd for setting the default date. If the start-date attribute is not present, it defaults to the first day of the next month. The start-date option is not convenient because it requires updating the hardcoded date every year.

It is also possible to set the default month by adding a default parameter on the px-date-month-selector, which can take a month number in the range of 1 to 12. If start-date is given, default is be ignored. But if start-month is not set, the starting date should default to the 1st day of the given month by choosing the year so that the constructed date is closest to the current date. For example, if default="1" and it's February 3rd 2023 today, the start date should default to 2023-01-01, but if today is July 20th, it should default to 2024-01-01.

On the px-date-year-selector, it is possible to define the set of year options that is available to the end user. It can simply be managed by setting a min and max parameter. For example, if the current date is June 1, 2023 and you have parameters set to min="-1" max="2", the user will have the following year options available to them: 2022, 2023, 2024, 2025. One year minus the current and two years plus the current one.

The below example has a wide range of parameters to demonstrate the possibilities, but is not intended to be simply copied and pasted to your site. Please carefully consider the values.

<px-date-selector start-date="2024-01-01">
    <px-date-month-selector 
        name="book[start_month]" 
        month-names="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec" 
        default="1"
        >
    </px-date-month-selector>
    <px-date-year-selector 
        name="book[start_year]"
        min="0" max="3"
        >
    </px-date-year-selector>
</px-date-selector>
Previous<px-image-upload>NextImport promocodes into Pixfizz admin

Last updated 1 year ago