Code Monkey home page Code Monkey logo

Comments (11)

DenTelezhkin avatar DenTelezhkin commented on July 18, 2024

You can access any datePicker property like so:

DTDatePickerPresenter * presenter = [DTDatePickerPresenter presenterWithChangeBlock:^(NSDate * selectedDate)
{
   // Update your model with NSDate     
}];
presenter.datePicker.datePickerMode = UIDatePickerModeDate;

from dtinlinedatepicker.

fsyn03 avatar fsyn03 commented on July 18, 2024

Thanks man, it is the same that i can change cell format date ?

from dtinlinedatepicker.

DenTelezhkin avatar DenTelezhkin commented on July 18, 2024

You can use NSDateFormatter for formatting NSDate.

from dtinlinedatepicker.

fsyn03 avatar fsyn03 commented on July 18, 2024

Yes but i do not understand where i can affect table view cell label…

from dtinlinedatepicker.

DenTelezhkin avatar DenTelezhkin commented on July 18, 2024

DTTableViewManager is used to manage relationship between data model and the cell.

Cell receives it's value in it's updateWithModel method: https://github.com/DenHeadless/DTInlineDatePicker/blob/master/Example/Cells/ExampleCell.m#L15

If it's the first time you are using DTTableViewManager, i recommend reading the readme.

from dtinlinedatepicker.

fsyn03 avatar fsyn03 commented on July 18, 2024

Thak you man i have understand, nevertheless i can't find a way to use another table view cell height.

from dtinlinedatepicker.

DenTelezhkin avatar DenTelezhkin commented on July 18, 2024

Standard UITableViewDelegate methods are supported, simply override tableView:heightForRowAtIndexPath: method.

from dtinlinedatepicker.

fsyn03 avatar fsyn03 commented on July 18, 2024

That simple, thank you very much DenHeadless, your DTInlinePicker is magic.

from dtinlinedatepicker.

fsyn03 avatar fsyn03 commented on July 18, 2024

Arf when i change table view height the picker come over the next cell…
Any idea ?

from dtinlinedatepicker.

DenTelezhkin avatar DenTelezhkin commented on July 18, 2024

Oh, sorry, i forgot to mention the height for date picker cells is overridden. Basically you can do two things:

  1. If you need the same cell height on all cells, except UIDatePicker cell, you can just set UITableView rowHeight property.
  2. If you need custom height for your cells, override tableView:heightForRowAtIndexPath: method, but check for DTDatePickerPresenter. Basically like here https://github.com/DenHeadless/DTInlineDatePicker/blob/master/DTInlineDatePicker/DTInlinePickerTableController.m#L71-L80

from dtinlinedatepicker.

fsyn03 avatar fsyn03 commented on July 18, 2024

i need option 1 but adding :

  • (CGFloat)tableView:(DTTableViewCell *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {

make the picker come over the other cell...

from dtinlinedatepicker.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.