from enthought.traits.trait_types import Bool, Int
from enthought.traits.ui.editor_factory import EditorFactory


#-- DateEditor definition ----------------------------------------------------- 
class DateEditor ( EditorFactory ):
    """
    Editor factory for date/time editors. 
    """

    #---------------------------------------------------------------------------
    #  Trait definitions:  
    #---------------------------------------------------------------------------
    
    #-- CustomEditor traits ---------------------------------------------------- 
    
    # True: Must be a List of Dates.  False: A Date instance.
    multi_select = Bool(False)
    
    # Should users be able to pick future dates when using the CustomEditor?
    allow_future = Bool(True)
      
    # How many months to show at a time.
    months = Int(3)

    # How much space to put between the individual months.
    padding = Int(5)

#-- end DateEditor definition ------------------------------------------------- 


#-- eof ----------------------------------------------------------------------- 

from enthought.traits.trait_types import Bool, Int
from enthought.traits.ui.editor_factory import EditorFactory


#-- DateEditor definition ----------------------------------------------------- 
class DateEditor ( EditorFactory ):
    """
    Editor factory for date/time editors. 
    """

    #---------------------------------------------------------------------------
    #  Trait definitions:  
    #---------------------------------------------------------------------------
    
    #-- CustomEditor traits ---------------------------------------------------- 
    
    # True: Must be a List of Dates.  False: Must be a Date instance.
    multi_select = Bool(False)
    
    # Should users be able to pick future dates when using the CustomEditor?
    allow_future = Bool(True)
      
    # How many months to show at a time.
    months = Int(3)

    # How much space to put between the individual months.
    padding = Int(5)
    
    # Does the user have to hold down Shift for the left-click multiselect?
    shift_to_select = Bool(False)

#-- end DateEditor definition ------------------------------------------------- 


#-- eof ----------------------------------------------------------------------- 

Allow shift to be required using a factory trait.
Allow shift to be required using a factory trait.

  from enthought.traits.trait_types import Bool, Int
  from enthought.traits.ui.editor_factory import EditorFactory
  
  
  #-- DateEditor definition ----------------------------------------------------- 
  class DateEditor ( EditorFactory ):
      """
      Editor factory for date/time editors. 
      """
  
      #---------------------------------------------------------------------------
      #  Trait definitions:  
      #---------------------------------------------------------------------------
      
      #-- CustomEditor traits ---------------------------------------------------- 
      
-     # True: Must be a List of Dates.  False: A Date instance.
+     # True: Must be a List of Dates.  False: Must be a Date instance.
      multi_select = Bool(False)
      
      # Should users be able to pick future dates when using the CustomEditor?
      allow_future = Bool(True)
        
      # How many months to show at a time.
      months = Int(3)
  
      # How much space to put between the individual months.
      padding = Int(5)
+     
+     # Does the user have to hold down Shift for the left-click multiselect?
+     shift_to_select = Bool(False)
  
  #-- end DateEditor definition ------------------------------------------------- 
  
  
  #-- eof ----------------------------------------------------------------------- 
  
Allow shift to be required using a factory trait.
## Code Before:
from enthought.traits.trait_types import Bool, Int
from enthought.traits.ui.editor_factory import EditorFactory


#-- DateEditor definition ----------------------------------------------------- 
class DateEditor ( EditorFactory ):
    """
    Editor factory for date/time editors. 
    """

    #---------------------------------------------------------------------------
    #  Trait definitions:  
    #---------------------------------------------------------------------------
    
    #-- CustomEditor traits ---------------------------------------------------- 
    
    # True: Must be a List of Dates.  False: A Date instance.
    multi_select = Bool(False)
    
    # Should users be able to pick future dates when using the CustomEditor?
    allow_future = Bool(True)
      
    # How many months to show at a time.
    months = Int(3)

    # How much space to put between the individual months.
    padding = Int(5)

#-- end DateEditor definition ------------------------------------------------- 


#-- eof ----------------------------------------------------------------------- 

## Instruction:
Allow shift to be required using a factory trait.
## Code After:
from enthought.traits.trait_types import Bool, Int
from enthought.traits.ui.editor_factory import EditorFactory


#-- DateEditor definition ----------------------------------------------------- 
class DateEditor ( EditorFactory ):
    """
    Editor factory for date/time editors. 
    """

    #---------------------------------------------------------------------------
    #  Trait definitions:  
    #---------------------------------------------------------------------------
    
    #-- CustomEditor traits ---------------------------------------------------- 
    
    # True: Must be a List of Dates.  False: Must be a Date instance.
    multi_select = Bool(False)
    
    # Should users be able to pick future dates when using the CustomEditor?
    allow_future = Bool(True)
      
    # How many months to show at a time.
    months = Int(3)

    # How much space to put between the individual months.
    padding = Int(5)
    
    # Does the user have to hold down Shift for the left-click multiselect?
    shift_to_select = Bool(False)

#-- end DateEditor definition ------------------------------------------------- 


#-- eof ----------------------------------------------------------------------- 
